Skip to content

useIndexQuery

useIndexQuery(manager, options): QueryAstResult<Record<string, unknown>> | undefined

Defined in: packages/index/src/react.ts:13

React hook that subscribes to live index query results. Re-runs the query when the result set changes and when options change.

IndexManager<unknown>

The IndexManager to query against.

QueryAst

Current query AST (predicate, ordering, cursor, and projection).

QueryAstResult<Record<string, unknown>> | undefined

The current result, or undefined while the initial query is pending.