1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/development/uiStore.js

19 lines
554 B
JavaScript
Raw Normal View History

2016-07-01 03:22:16 +02:00
const createStore = require('redux').createStore
const applyMiddleware = require('redux').applyMiddleware
2017-09-05 17:58:01 +02:00
const thunkMiddleware = require('redux-thunk').default
const createLogger = require('redux-logger').createLogger
2016-07-01 03:22:16 +02:00
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)
}