text: import { createStore, applyMiddleware, compose } from 'redux';
  import createSagaMiddleware from 'redux-saga';
  import rootSaga from './sagas';
  import rootReducer from './reducers';
  
  function configureStore (initialState) {
    const sagaMiddleware = createSagaMiddleware();
  
    const store = createStore(
      rootReducer,
      initialState,
      compose(
        applyMiddleware(sagaMiddleware),
        typeof window !== 'undefined' && window.devToolsExtension ? window.devToolsExtension() : f => f)
    );
  
    sagaMiddleware.run(rootSaga);
  
    return store;
  }
  
  export default configureStore;
  