mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 02:58:09 +01:00
20 lines
525 B
JavaScript
20 lines
525 B
JavaScript
|
const createStore = require('redux').createStore
|
||
|
const applyMiddleware = require('redux').applyMiddleware
|
||
|
const thunkMiddleware = require('redux-thunk')
|
||
|
const createLogger = require('redux-logger')
|
||
|
const rootReducer = require('./reducers')
|
||
|
|
||
|
module.exports = configureStore
|
||
|
|
||
|
|
||
|
const loggerMiddleware = createLogger()
|
||
|
|
||
|
const createStoreWithMiddleware = applyMiddleware(
|
||
|
thunkMiddleware,
|
||
|
loggerMiddleware
|
||
|
)(createStore)
|
||
|
|
||
|
function configureStore(initialState) {
|
||
|
return createStoreWithMiddleware(rootReducer, initialState)
|
||
|
}
|