text: import { createStore,applyMiddleware } from 'redux';
  import thunkMiddleware from 'redux-thunk'
  import createLogger from 'redux-logger'
  import { randomHero } from './reducer';
  
  const createStoreWithMiddleware = applyMiddleware(
    thunkMiddleware,
    createLogger()
  )(createStore)
  
  
  // const store = createStoreWithMiddleware(randomHero);
  
  export default function configureStore(initialState) {
    const store = createStoreWithMiddleware(randomHero)
  
    if (module.hot) {
      // Enable Webpack hot module replacement for reducers
      module.hot.accept('./reducer', () => {
        const nextRootReducer = require('./reducer')
        store.replaceReducer(nextRootReducer)
      })
    }
  
    return store
  }