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.

useQueryBuilderSelector(selector, equalityFn)

useQueryBuilderSelector<TSelected>(selector, equalityFn?): TSelected

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.

Type Parameters

Type Parameter
TSelected

Parameters

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

Returns

TSelected

Defined in

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

useQueryBuilderSelector(selector, options)

useQueryBuilderSelector<Selected>(selector, options?): Selected

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.

Type Parameters

Type ParameterDefault type
Selectedunknown

Parameters

ParameterType
selector(state) => 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.