Skip to content

Instantly share code, notes, and snippets.

@ayroblu
Created February 18, 2017 23:54
Show Gist options
  • Save ayroblu/b7a7c180e4bbfe9d26293d2c8619d53f to your computer and use it in GitHub Desktop.
Save ayroblu/b7a7c180e4bbfe9d26293d2c8619d53f to your computer and use it in GitHub Desktop.
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