Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
function* queryCSubSaga(params, query) {
yield call(() => console.log('Enter route C query sub-saga', query));
try {
yield call(() => new Promise(() => {})); // halt here
} finally {
if (yield cancelled()) {
yield call(() => console.log('Cancelled route C query sub-saga', query));
}
}
}
const routesMap = buildRoutesMap(
route('A', '/a', navigateASaga),
route('B', '/b/:timeStamp', navigateBSaga),
route('C', '/c/:opt?', navigateCSaga, queryCSaga),
route('_ROOT_', '/', function* navigateRoot() {
yield put(navigate('A'));
})
);
const reducer = combineReducers({
routing: routerReducer,
});
const composeEnhancers =
(process.env.NODE_ENV === 'development' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose;
const sagaMiddleware = createSagaMiddleware();
function* queryCSubSaga(params, query) {
yield call(() => console.log('Enter route C query sub-saga', query));
try {
yield call(() => new Promise(() => {})); // halt here
} finally {
if (yield cancelled()) {
yield call(() => console.log('Cancelled route C query sub-saga', query));
}
}
}
const routesMap = buildRoutesMap(
route('A', '/a', navigateASaga),
route('B', '/b/:timeStamp', navigateBSaga),
route('C', '/c/:opt?', navigateCSaga, queryCSaga),
route('_ROOT_', '/', function* navigateRoot() {
yield put(navigate('A'));
})
);
const reducer = combineReducers({
routing: routerReducer,
});
const composeEnhancers =
(process.env.NODE_ENV === 'development' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose;
const sagaMiddleware = createSagaMiddleware();
const store = createStore(reducer, composeEnhancers(applyMiddleware(sagaMiddleware)));
yield fork(queryCSubSaga, ...args);
}
function* queryCSubSaga(params, query) {
yield call(() => console.log('Enter route C query sub-saga', query));
try {
yield call(() => new Promise(() => {})); // halt here
} finally {
if (yield cancelled()) {
yield call(() => console.log('Cancelled route C query sub-saga', query));
}
}
}
const routesMap = buildRoutesMap(
route('A', '/a', navigateASaga),
route('B', '/b/:timeStamp', navigateBSaga),
route('C', '/c/:opt?', navigateCSaga, queryCSaga),
route('_ROOT_', '/', function* navigateRoot() {
yield put(navigate('A'));
})
);
const reducer = combineReducers({
routing: routerReducer,
});
const composeEnhancers =
(process.env.NODE_ENV === 'development' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose;
const sagaMiddleware = createSagaMiddleware();
function* queryCSubSaga(params, query) {
yield call(() => console.log('Enter route C query sub-saga', query));
try {
yield call(() => new Promise(() => {})); // halt here
} finally {
if (yield cancelled()) {
yield call(() => console.log('Cancelled route C query sub-saga', query));
}
}
}
const routesMap = buildRoutesMap(
route('A', '/a', navigateASaga),
route('B', '/b/:timeStamp', navigateBSaga),
route('C', '/c/:opt?', navigateCSaga, queryCSaga),
route('_ROOT_', '/', function* navigateRoot() {
yield put(navigate('A'));
})
);
const reducer = combineReducers({
routing: routerReducer,
});
const composeEnhancers =
(process.env.NODE_ENV === 'development' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose;
const sagaMiddleware = createSagaMiddleware();
const store = createStore(reducer, composeEnhancers(applyMiddleware(sagaMiddleware)));
yield fork(queryCSubSaga, ...args);
}
function* queryCSubSaga(params, query) {
yield call(() => console.log('Enter route C query sub-saga', query));
try {
yield call(() => new Promise(() => {})); // halt here
} finally {
if (yield cancelled()) {
yield call(() => console.log('Cancelled route C query sub-saga', query));
}
}
}
const routesMap = buildRoutesMap(
route('A', '/a', navigateASaga),
route('B', '/b/:timeStamp', navigateBSaga),
route('C', '/c/:opt?', navigateCSaga, queryCSaga),
route('_ROOT_', '/', function* navigateRoot() {
yield put(navigate('A'));
})
);
const reducer = combineReducers({
routing: routerReducer,
});
const composeEnhancers =
(process.env.NODE_ENV === 'development' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose;
route('_ROOT_', '/', function* navigateRoot() {
yield put(navigate('A'));
})
);