(preloadedState)
| 3 | import rootReducer from '../reducers' |
| 4 | |
| 5 | const configureStore = (preloadedState) => { |
| 6 | const store = createStore( |
| 7 | rootReducer, |
| 8 | preloadedState, |
| 9 | applyMiddleware(thunk) |
| 10 | ) |
| 11 | |
| 12 | if (module.hot) { |
| 13 | // Enable Webpack hot module replacement for reducers |
| 14 | module.hot.accept('../reducers', () => { |
| 15 | store.replaceReducer(rootReducer) |
| 16 | }) |
| 17 | } |
| 18 | |
| 19 | return store |
| 20 | } |
| 21 | |
| 22 | export default configureStore |
no test coverage detected