Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Last active October 6, 2018 10:48
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/9b5de16ae83b6bee294a9a6b59954cd5 to your computer and use it in GitHub Desktop.
Save productioncoder/9b5de16ae83b6bee294a9a6b59954cd5 to your computer and use it in GitHub Desktop.
Youtube Redux store Redux DevTools setup
import {applyMiddleware, compose, createStore} from 'redux';
import reducer from './reducers';
import createSagaMiddleware from 'redux-saga';
import rootSaga from './sagas';
export function configureStore() {
const sagaMiddleware = createSagaMiddleware();
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(reducer, 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