text: import { createStore, combineReducers, applyMiddleware, compose } from 'redux';
  import thunk from 'redux-thunk';
  import { syncHistoryWithStore, routerMiddleware } from 'react-router-redux'
  import { browserHistory } from 'react-router'
  import rootReducer from '../reducers';
  
  const enhancer = compose(
    applyMiddleware(
      thunk,
      routerMiddleware(browserHistory)
    ),
    window.devToolsExtension ? window.devToolsExtension() : f => f,
  );
  
  export default function configureStore(initialState) {
    const store = createStore(rootReducer, initialState, enhancer);
  
    if (module.hot) {
      module.hot.accept('../reducers', () =>
        store.replaceReducer(require('../reducers').default)
      );
    }
  
    return store;
  }
  