Ariakit
/

useRadioContext

Returns the radio store from the nearest radio container.

Code examples

function Radio() {
const store = useRadioContext();
if (!store) {
throw new Error("Radio must be wrapped in RadioProvider");
}
// Use the store...
}

Stay tuned

Join 1,000+ subscribers and receive monthly tips & updates on new Ariakit content.

No spam. Unsubscribe anytime. Read latest issue