Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Last active October 6, 2018 10:36
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 productioncoder/6ed4890d50076f869f9cb58e28ece05f to your computer and use it in GitHub Desktop.
Save productioncoder/6ed4890d50076f869f9cb58e28ece05f to your computer and use it in GitHub Desktop.
Youtube configure Redux store
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