Returns the composite store from the nearest composite container.

Code examples

function CompositeItem() {
const store = useCompositeContext();
if (!store) {
throw new Error("CompositeItem must be wrapped in CompositeProvider");
// Use the store...

Follow updates

Join 1,000+ subscribers and receive monthly updates with the latest improvements on API Reference.

Read latest issue

No Spam. Unsubscribe at any time.