import { applyMiddleware, createStore } from 'redux' import thunkMiddleware from 'redux-thunk' import { createLogger } from 'redux-logger' const rootReducer = function () {} export default configureStore const loggerMiddleware = createLogger() const createStoreWithMiddleware = applyMiddleware( thunkMiddleware, loggerMiddleware )(createStore) function configureStore (initialState) { return createStoreWithMiddleware(rootReducer, initialState) }