2017-05-16 00:07:38 +02:00
|
|
|
const createStore = require('redux').createStore
|
|
|
|
const applyMiddleware = require('redux').applyMiddleware
|
2017-09-06 20:04:17 +02:00
|
|
|
const thunkMiddleware = require('redux-thunk').default
|
|
|
|
const createLogger = require('redux-logger').createLogger
|
2017-05-28 20:18:07 +02:00
|
|
|
const rootReducer = function () {}
|
2017-05-16 00:07:38 +02:00
|
|
|
|
|
|
|
module.exports = configureStore
|
|
|
|
|
|
|
|
const loggerMiddleware = createLogger()
|
|
|
|
|
|
|
|
const createStoreWithMiddleware = applyMiddleware(
|
|
|
|
thunkMiddleware,
|
|
|
|
loggerMiddleware
|
|
|
|
)(createStore)
|
|
|
|
|
|
|
|
function configureStore (initialState) {
|
|
|
|
return createStoreWithMiddleware(rootReducer, initialState)
|
|
|
|
}
|