Created
April 1, 2017 23:10
-
-
Save LazyFatArrow/5fff113d509f78a75c259b3055d24dbc to your computer and use it in GitHub Desktop.
This file contains 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
import createSagaMiddleware from 'redux-saga'; | |
// code | |
// root reducer | |
import rootReducer from './rootReducer'; | |
// root saga | |
import rootSaga from './rootSaga'; | |
// code | |
// create the store | |
const sagaMiddleware = createSagaMiddleware(); | |
const configureStore = () => { | |
const store = { | |
...createStore(rootReducer, composeEnhancers( | |
applyMiddleware(sagaMiddleware))) | |
}; | |
sagaMiddleware.run(rootSaga); | |
return store; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment