You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
533 B
19 lines
533 B
8 years ago
|
const createStore = require('redux').createStore
|
||
|
const applyMiddleware = require('redux').applyMiddleware
|
||
|
const thunkMiddleware = require('redux-thunk')
|
||
|
const createLogger = require('redux-logger')
|
||
|
const rootReducer = require('../ui/app/reducers')
|
||
|
|
||
|
module.exports = configureStore
|
||
|
|
||
|
const loggerMiddleware = createLogger()
|
||
|
|
||
|
const createStoreWithMiddleware = applyMiddleware(
|
||
|
thunkMiddleware,
|
||
|
loggerMiddleware
|
||
|
)(createStore)
|
||
|
|
||
|
function configureStore (initialState) {
|
||
|
return createStoreWithMiddleware(rootReducer, initialState)
|
||
|
}
|