Last active
October 6, 2018 10:36
-
-
Save productioncoder/6ed4890d50076f869f9cb58e28ece05f to your computer and use it in GitHub Desktop.
Youtube configure Redux store
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 {applyMiddleware, createStore} from 'redux'; | |
import reducer from './reducers'; | |
import createSagaMiddleware from 'redux-saga'; | |
import rootSaga from './sagas'; | |
export function configureStore() { | |
const sagaMiddleware = createSagaMiddleware(); | |
const store = createStore( | |
reducer, | |
applyMiddleware(sagaMiddleware) | |
); | |
sagaMiddleware.run(rootSaga); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment