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.
Parameters
Section titled “Parameters”manager
Section titled “manager”IndexManager<unknown>
The IndexManager to query against.
options
Section titled “options”Current query AST (predicate, ordering, cursor, and projection).
Returns
Section titled “Returns”QueryAstResult<Record<string, unknown>> | undefined
The current result, or undefined while the initial query is pending.