hooks
use-select-store
Code

useSelectStore

useSelectStore<T>(props): SelectStore<T>

Creates a select store.

Type parameters

NameType
Textends Value = Value

Parameters

NameType
propsPickRequired<SelectStoreProps<T>, "defaultValue" | "value">

Returns

SelectStore<T>

See

https://ariakit.org/components/select (opens in a new tab)

Example

const select = useSelectStore({ defaultValue: "Apple" });
<Select store={select} />
<SelectPopover store={select}>
  <SelectItem value="Apple" />
  <SelectItem value="Orange" />
</SelectPopover>

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-store.d.ts:31

useSelectStore(props?): SelectStore

Parameters

NameType
props?SelectStoreProps<Value>

Returns

SelectStore

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-store.d.ts:32