You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/createSlice.mdx
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -213,6 +213,10 @@ The generated `reducer` function is suitable for passing to the Redux `combineRe
213
213
You may want to consider destructuring the action creators and exporting them individually, for ease of searching
214
214
for references in a larger codebase.
215
215
216
+
The functions passed to the `reducers` parameter can be accessed through the `caseReducers` return field. This can be particularly useful for testing or direct access to reducers created inline.
217
+
218
+
Result's function `getInitialState` provides access to the initial state value given to the slice. If a lazy state initializer was provided, it will be called and a fresh value returned.
219
+
216
220
> **Note**: the result object is conceptually similar to a
0 commit comments