score:0

...
import reducerInjector, { createReducer, createInitialState } from './reducerInjector';

const configureStore = (initialState, ssr) => {
  const sagaMiddleware = createSagaMiddleware({});
  const createStoreWithMiddleware = compose(applyMiddleware(thunkMiddleware, sagaMiddleware));
  const reducer = createReducer(rootReducer, {}, initialState);
  const initialData = createInitialState(rootReducer, initialState);
  let store = createStoreWithMiddleware(createStore)(reducer, initialData);
  store = reducerInjector(store, rootReducer, initialState);
  return store;
}


Related Query

More Query from same tag