Slices pattern with Nextjs app router #2412
Replies: 1 comment
-
Working with Slices in NextJS is not too dissimilar from the normal Store setup. There are just a couple of tweaks you need to make to break your store down into slices and consume them from a Provider. The example below largely mimics the suggested approach in the Zustand Docs, albeit; using Slices. Here is some example boiler-plate to help get you going: Tree Structure (NextJS 14)
Files
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With nextjs app router, its important to have providers, and in the docs it shows how to create a provider for one store, can someone give me some advice on applying the slices pattern to all this? as it stands i have created multuple providers and wrap my app in all of them
Beta Was this translation helpful? Give feedback.
All reactions