Ariakit
/

useDisclosureContext

Returns the disclosure store from the nearest disclosure container.

Code examples

function Disclosure() {
const store = useDisclosureContext();
if (!store) {
throw new Error("Disclosure must be wrapped in DisclosureProvider");
}
// 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.