Skip to content

Commit 0fa46d4

Browse files
committed
Add missing docs paragraphs
1 parent 7532c9b commit 0fa46d4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/usage/migrating-rtk-2.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,9 @@ expect(combinedReducer(undefined, dummyAction()).number).toBe(
523523

524524
### `selectors` field in `createSlice`
525525

526-
The existing `createSlice` API now has support for defining [`selectors`](../api/createSlice#selectors) directly as part of the slice. By default, these will be generated with the assumption that the slice is mounted in the root state using `slice.name` as the field, such as `name: "todos"` -> `rootState.todos`. You can call `sliceObject.getSelectors(selectSliceState)` to generate the selectors with an alternate location, similar to how `entityAdapter.getSelectors()` works.
526+
The existing `createSlice` API now has support for defining [`selectors`](../api/createSlice#selectors) directly as part of the slice. By default, these will be generated with the assumption that the slice is mounted in the root state using `slice.name` as the field, such as `name: "todos"` -> `rootState.todos`. Additionally, there's now a `slice.selectSlice` method that does that default root state lookup.
527+
528+
You can call `sliceObject.getSelectors(selectSliceState)` to generate the selectors with an alternate location, similar to how `entityAdapter.getSelectors()` works.
527529

528530
```ts
529531
const slice = createSlice({
@@ -715,6 +717,12 @@ We've updated `configureStore` to add the `autoBatchEnhancer` to the store setup
715717

716718
We've updated RTK to depend on the final Immer 10.0 release.
717719

720+
### Next.js Setup Guide
721+
722+
We now have a docs page that covers [how to set up Redux properly with Next.js](https://redux.js.org/usage/nextjs). We've seen a lot of questions around using Redux, Next, and the App Router together, and this guide should help provide advice.
723+
724+
(At this time, the Next.js `with-redux` example is still showing outdated patterns - we're going to file a PR shortly to update that to match our docs guide.)
725+
718726
## Recommendations
719727

720728
Based on changes in 2.0 and previous versions, there have been some shifts in thinking that are good to know about, if non-essential.

0 commit comments

Comments
 (0)