Skip to content

Commit 8ea24bb

Browse files
authored
docs: fix import nanoid from redux-toolkit
1 parent 468dd3a commit 8ea24bb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/api/createSlice.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ const counterSlice = createSlice({
106106
If you need to customize the creation of the payload value of an action creator by means of a [`prepare callback`](./createAction.mdx#using-prepare-callbacks-to-customize-action-contents), the value of the appropriate field of the `reducers` argument object should be an object instead of a function. This object must contain two properties: `reducer` and `prepare`. The value of the `reducer` field should be the case reducer function while the value of the `prepare` field should be the prepare callback function:
107107

108108
```ts
109-
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
110-
import { nanoid } from 'nanoid'
109+
import { createSlice, PayloadAction, nanoid } from '@reduxjs/toolkit'
111110
112111
interface Item {
113112
id: string

0 commit comments

Comments
 (0)