useQuery()
useQuery(options, queryClient)
function useQuery<TData, TError>(options, queryClient?): Tanstack.UseQueryResult<TData, TError>
Type parameters
Type parameter | Value |
---|---|
TData | unknown |
TError | Error |
Parameters
Parameter | Type |
---|---|
options | UseQueryOptions <TData , TError , TData , QueryKey > & PowerSyncQueryOptions <any > & { query : undefined ; } |
queryClient ? | QueryClient |
Returns
Tanstack.UseQueryResult
<TData
, TError
>
useQuery(options, queryClient)
function useQuery<TData, TError>(options, queryClient?): Tanstack.UseQueryResult<TData[], TError>
Type parameters
Type parameter | Value |
---|---|
TData | unknown |
TError | Error |
Parameters
Parameter | Type |
---|---|
options | UseQueryOptions <TData [], TError , TData [], QueryKey > & PowerSyncQueryOptions <any > & { query : string | CompilableQuery <TData >; } |
queryClient ? | QueryClient |
Returns
Tanstack.UseQueryResult
<TData
[], TError
>