routier-collection / react/src / useQuery
Function: useQuery()
useQuery<
T>(query,deps):LiveQueryState<T>
Defined in: react/src/useQuery.tsx:9
Type Parameters
T
T
Parameters
query
(callback) => void | () => void
Function that sets up the subscription and invokes the callback with results. Must return the unsubscribe handler (the return value of the query chain, e.g. .subscribe().where(...).firstOrUndefined(callback)) so the hook can clean up on unmount or when dependencies change.
deps
any[] = []
Returns
LiveQueryState<T>