docs: adding note about middlewares and slices (#2378)

* docs: adding note about middlewares and slices

* chore: updating slices note

Co-authored-by: Blazej Sewera <code@sewera.dev>

---------

Co-authored-by: Blazej Sewera <code@sewera.dev>
This commit is contained in:
Michael Di Prisco 2024-03-01 22:39:16 +01:00 committed by GitHub
parent 41924df88f
commit 1392c51fae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,6 +113,8 @@ export const useBoundStore = create(
)
```
Please keep in mind you should only apply middlewares in the combined store. Applying them inside individual slices can lead to unexpected issues.
## Usage with TypeScript
A detailed guide on how to use the slice pattern in Zustand with TypeScript can be found [here](./typescript.md#slices-pattern).