Skip to content

API Documentation / @pinia/colada / UseQueryStateReturn

Interface: UseQueryStateReturn<TData, TError, TDataInitial> ​

Return type for the useQueryState composable.

See ​

useQueryState

Type Parameters ​

TData ​

TData = unknown

TError ​

TError = ErrorDefault

TDataInitial ​

TDataInitial extends TData | undefined = undefined

Properties ​

asyncStatus ​

ts
asyncStatus: ComputedRef<AsyncStatus | undefined>;

asyncStatus of the query entry.

See ​


data ​

ts
data: ComputedRef<TData | TDataInitial | undefined>;

data of the query entry.

See ​

UseQueryReturn#data


error ​

ts
error: ComputedRef<TError | null | undefined>;

error of the query entry.

See ​

UseQueryReturn#error


isPending ​

ts
isPending: ComputedRef<boolean>;

Is the query entry currently pending or non existent.


state ​

ts
state: ComputedRef<
  | DataState<TData, TError, TDataInitial>
| undefined>;

state of the query entry.

See ​

UseQueryReturn#state


status ​

ts
status: ComputedRef<DataStateStatus | undefined>;

status of the query entry.

See ​

Released under the MIT License.