Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ConfiguringYourStore.md #4606

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/usage/ConfiguringYourStore.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ By default, `configureStore` from Redux Toolkit will:
Here's what the hot reloading example might look like using Redux Toolkit:

```js
import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit'
import { configureStore } from '@reduxjs/toolkit'

import monitorReducersEnhancer from './enhancers/monitorReducers'
import loggerMiddleware from './middleware/logger'
Expand All @@ -356,7 +356,7 @@ import rootReducer from './reducers'
export default function configureAppStore(preloadedState) {
const store = configureStore({
reducer: rootReducer,
middleware: [loggerMiddleware, ...getDefaultMiddleware()],
middleware: (getDefaultMiddleware) => [loggerMiddleware, ...getDefaultMiddleware().prepend()],
koechkevin marked this conversation as resolved.
Show resolved Hide resolved
preloadedState,
enhancers: [monitorReducersEnhancer]
})
Expand Down