Created
January 13, 2019 14:26
-
-
Save BiosBoy/fabc3609cedf6707dde0e287f54d9eac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // saga entry point - propbably you don't need this | |
| import createSagaMiddleware from 'redux-saga'; | |
| import { all } from 'redux-saga/effects'; | |
| import createSagaMiddlewareHelpers from 'redux-saga-watch-actions/lib/middleware'; | |
| import watchSagas from '../../modules/saga'; | |
| const sagaMiddleware = createSagaMiddleware(); | |
| const runSaga = saga => sagaMiddleware.run(saga); | |
| const { injectSaga, cancelTask } = createSagaMiddlewareHelpers(sagaMiddleware); // <-- bind to sagaMiddleware.run | |
| export function* rootSaga() { | |
| yield all([watchSagas()]); | |
| } | |
| export { cancelTask, injectSaga, runSaga }; | |
| export default sagaMiddleware; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment