aboutsummaryrefslogblamecommitdiffstats
path: root/development/uiStore.js
blob: c71d66d3b6701c2c6315256f76444bf70c506439 (plain) (tree)
1
2
3
4

                                                        

                                                         













                                                             
const createStore = require('redux').createStore
const applyMiddleware = require('redux').applyMiddleware
const thunkMiddleware = require('redux-thunk').default
const createLogger = require('redux-logger').createLogger
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)
}