Skip to main content

useQueryBuilderSelector()

A Redux useSelector hook for RQB's internal store. See also getQuerySelectorById.

TIP: Prefer useQueryBuilderQuery if you only need to access the query object for the nearest ancestor QueryBuilder component.

Call Signature

useQueryBuilderSelector<TSelected>(selector: (state: RqbState) => TSelected, equalityFn?: EqualityFn<NoInfer<TSelected>>): TSelected

Type Parameters

Type Parameter
TSelected

Parameters

ParameterType
selector(state: RqbState) => TSelected
equalityFn?EqualityFn<NoInfer<TSelected>>

Returns

TSelected

Defined in

packages/react-querybuilder/src/redux/hooks.ts:20

Call Signature

useQueryBuilderSelector<Selected>(selector: (state: RqbState) => Selected, options?: UseSelectorOptions<Selected>): Selected

Type Parameters

Type ParameterDefault type
Selectedunknown

Parameters

ParameterType
selector(state: RqbState) => Selected
options?UseSelectorOptions<Selected>

Returns

Selected

Defined in

packages/react-querybuilder/src/redux/hooks.ts:20


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.