Created
February 18, 2017 23:54
-
-
Save ayroblu/b7a7c180e4bbfe9d26293d2c8619d53f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStore, applyMiddleware, compose } from 'redux' | |
import reducers from './reducers' | |
export default function configureStore(initialState = {}) { | |
// Create the store with middlewares | |
const middlewares = [ | |
] | |
const enhancers = [ | |
applyMiddleware(...middlewares) | |
] | |
const store = createStore( | |
reducers | |
, initialState | |
, compose(...enhancers) | |
) | |
// Extensions | |
store.asyncReducers = {} // Async reducer registry | |
return store | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment