Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import { compose, createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import thunkMiddleware from 'redux-thunk';
import createReducer from './createReducer';
import sagas from './rootSaga';
let store;
export default () => {
const reducer = createReducer();
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const middleware = [];
const sagaMiddleware = createSagaMiddleware();
store = createStore(reducer, composeEnhancers(applyMiddleware(...middleware)));;
return store;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.