useSelectContext
▸ useSelectContext(): undefined
| SelectStore
<Value
>
Returns the select store from the nearest select container.
Returns
undefined
| SelectStore
<Value
>
Example
function Select() {
const store = useSelectContext();
if (!store) {
throw new Error("Select must be wrapped in SelectProvider");
}
// Use the store...
}
Defined in
node_modules/.pnpm/@ariakit+react-core@0.3.5_react-dom@18.2.0_react@18.2.0/node_modules/@ariakit/react-core/cjs/select/select-context.d.ts:15