API Documentation / @pinia/colada / useQuery
Function: useQuery()
ts
function useQuery<TResult, TError, TDataInitial>(_options): UseQueryReturn<TResult, TError, TDataInitial>
Ensures and return a shared query state based on the key
option.
Type Parameters
TResult
TResult
TError
TError
= { custom
: Error
; }
TDataInitial
TDataInitial
= undefined
Parameters
_options
UseQueryOptions
<TResult
, TError
, TDataInitial
>
The options of the query
Returns
UseQueryReturn
<TResult
, TError
, TDataInitial
>