Created
August 24, 2016 07:28
-
-
Save pfulop/30796d0984a637ef3025a4c150e49bc0 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 } from 'redux'; | |
import rootReducer from '../reducers'; | |
export default function configureStore () { | |
const store = createStore(rootReducer); | |
if (module.hot) { | |
module.hot.accept(() => { | |
const nextRootReducer = require('../reducers/index').default; | |
store.replaceReducer(nextRootReducer); | |
}); | |
} | |
return store; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment