docs(recipes): fix description of devtools store naming (#1792)

This commit is contained in:
Brendan Dash 2023-05-05 20:30:40 +08:00 committed by GitHub
parent 0784028ed7
commit 639aa00699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -410,8 +410,8 @@ const useStore = create(devtools(store, { enabled: false }))
```
The `devtools` middleware takes the store function as its first argument.
Optionally, you can name the store with a second argument:
`devtools(store, "MyStore")`, which will be prefixed to your actions.
Optionally, you can name the store with a second argument `devtoolsOptions`:
`devtools(store, { store: "MyStore" })`, which will be prefixed to your actions.
`devtools` will only log actions from each separated store,
unlike in a typical _combined reducers_ Redux store.