diff options
Add mock dev mode
Diffstat (limited to 'development/uiStore.js')
-rw-r--r-- | development/uiStore.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/development/uiStore.js b/development/uiStore.js new file mode 100644 index 000000000..1299ee1dc --- /dev/null +++ b/development/uiStore.js @@ -0,0 +1,18 @@ +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) +} |