StoreProvider
variableReact provider that places a StoreInstance into StoreContext.
- Wrap your app (or a subtree) to make the store available via
useContext(StoreContext)
or any higher-level hooks you expose (e.g., useAtomicProp, useEmit).
- You may nest multiple StoreProviders to scope different stores to different subtrees.
- In Next.js App Router, this component must be used in a **client** boundary.Definition
const
const StoreProvider: React.FC<{ children: ReactNode; store: StoreInstance<any, any, any> }>React.FC<{ children: ReactNode; store: StoreInstance<any, any, any> }>