text: import { compose, createStore, applyMiddleware } from 'redux';
  import rootReducer from '../reducers';
  import createLogger from 'redux-logger';
  import thunk from 'redux-thunk';
  import persistState from 'redux-localstorage';
  
  const createPersistentStore = compose(
    persistState(/*paths, config*/)
  )(createStore);
  
  export default function configureStore(initialState) {
    const logger = createLogger();
    const store = createPersistentStore(
      rootReducer,
      initialState,
      applyMiddleware(thunk, logger)
    );
  
    if (module.hot) {
      module.hot.accept('../reducers', () => {
        const nextRootReducer = require('../reducers');
        store.replaceReducer(nextRootReducer);
      });
    }
  
    return store;
  }