1import { all, fork, take } from 'redux-saga/effects';
2import { REHYDRATE } from 'redux-persist/lib/constants';
3import { mySagaA, mySagaB, mySagaC } from './mySagas';
4
5function* rootSaga() {
6 console.log("Waiting for rehydration")
7 yield take(REHYDRATE); // Wait for rehydrate to prevent sagas from running with empty store
8 console.log("Rehydrated")
9 yield all([
10 fork(mySagaA),
11 fork(mySagaB),
12 fork(mySagaC),
13 ]);
14}