import { createStore, applyMiddleware } from 'redux'
import rootReducer from '../reducers/index'

const createStoreWithMiddleware = applyMiddleware()(createStore)

export default function configureStore(initialState) {
  return createStoreWithMiddleware(rootReducer, initialState)
}

import { createStore, applyMiddleware } from 'redux'
import createLogger from 'redux-logger'

import rootReducer from '../reducers/index'

const logger = createLogger()
const createStoreWithMiddleware = applyMiddleware(logger)(createStore)

export default function configureStore(initialState) {
  return createStoreWithMiddleware(rootReducer, initialState)
}

Integrate logger middleware with redux
Integrate logger middleware with redux
