minca
ApiReactFunctions

Function: useQuery()

function useQuery<C, I>(spaceId, query): QueryState<ResultFor<C, I>>;

Defined in: packages/react/src/use-query.ts:17

Runs a query and keeps it current as records change, locally or by sync. The query is plain data, compared by value, so writing it inline is fine. Name the collection by its definition and the result comes back typed.

Type Parameters

Type ParameterDefault type
C extends CollectionRef-
I extends | Readonly<Record<string, Include>> | undefinedundefined

Parameters

ParameterType
spaceIdstring
queryQuery<C, I>

Returns

QueryState<ResultFor<C, I>>

On this page