MCPcopy
hub / github.com/reduxjs/redux / configureStore

Function configureStore

examples/real-world/src/store/configureStore.dev.js:8–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import DevTools from '../containers/DevTools'
7
8const configureStore = preloadedState => {
9 const store = createStore(
10 rootReducer,
11 preloadedState,
12 compose(
13 applyMiddleware(thunk, api, createLogger()),
14 DevTools.instrument()
15 )
16 )
17
18 if (module.hot) {
19 // Enable Webpack hot module replacement for reducers
20 module.hot.accept('../reducers', () => {
21 store.replaceReducer(rootReducer)
22 })
23 }
24
25 return store
26}
27
28export default configureStore

Callers 1

index.jsFile · 0.50

Calls 4

createStoreFunction · 0.85
composeFunction · 0.85
applyMiddlewareFunction · 0.85
replaceReducerMethod · 0.80

Tested by

no test coverage detected