Scoped store
Scoped store
If your app is SSR or for example you just want to have the same store shape but keep different values for different routes you can use scoped store
It returns:
StoreProvider
- Provider that passes scoped store down to the React’s treewithStore
- HOC that passes scoped store down to the React’s treeuseScopedStore
- React hook used to access scoped store (actions, effect, etc.)useStore
- Regular useStore hook but with the scoped storeuseStoreEffect
- Regular useStoreEffect hook but with the scoped store