Skip to content

Instantly share code, notes, and snippets.

@OleksivO
Created January 16, 2019 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OleksivO/0521e956ef86fc6d241c71d8d0af9eb8 to your computer and use it in GitHub Desktop.
Save OleksivO/0521e956ef86fc6d241c71d8d0af9eb8 to your computer and use it in GitHub Desktop.
the description for this gist
//...
const rootReducer = combineReducers({
// ...
});
const sagaMiddleware = createSagaMiddleware();
// we apply saga as a simple middleware (Redux-Thunk for example)
const store = createStore(rootReducer, composeEnhancers(
applyMiddleware(sagaMiddleware)
));
// if you have multiple watchers, you should execute .run() for every single one
sagaMiddleware.run(watchAuthSaga);
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment