wow-react query hooks
Wow hooks specialize the same query executor with request/result types. They do not create query clients or build conditions for you. Use service-based variants with an execute function, or Fetcher variants with a required url and optional named/instance Fetcher.
| Service hook | Fetcher hook | Request → result |
|---|---|---|
| useSingleQuery | useFetcherSingleQuery | SingleQueryRequest → R |
| useListQuery | useFetcherListQuery | ListQueryRequest → R[] |
| usePagedQuery | useFetcherPagedQuery | PagedQueryRequest → PagedList<R> (total, list) |
| useCountQuery | useFetcherCountQuery | FilterExpression, or legacy Condition → number |
| useListStreamQuery | useFetcherListStreamQuery | ListQueryRequest → items: R[] as rows arrive |
The query type defaults to FilterSingleQuery, FilterListQuery, FilterPagedQuery, or FilterExpression. A second overload of each hook accepts the deprecated Condition queries imported from @ahoo-wang/wow-client/legacy, which Wow 8.10 servers need; that overload is removed in v10. SingleQueryRequest, ListQueryRequest, and PagedQueryRequest in the signatures below are the unions of both kinds, also exported by /legacy. FIELDS restricts field names statically. Type arguments do not validate server JSON. The corresponding Use…Options and Use…Return interfaces inherit query state and, for Fetcher variants, Fetcher options. Defaults: autoExecute true, propagateError false, no initial query unless provided. Fetcher variants POST the query to url and extract JSON; the stream variant sends Accept: text/event-stream and reads the answer with wow-client's QueryEventStreamResultExtractor.
A newer query aborts the one in flight, and a late response never overwrites a newer one; an unmount aborts too. Pass the controller on to the service client so an abort stops the I/O: the last parameter of every wow-client query method, abort, takes the AbortController or its signal. A failed request sets error to the fetcher's error (ExchangeError); await toWowError(error) from @ahoo-wang/wow-client reads errorCode, errorMsg, and status from it.
List streams
useListStreamQuery and useFetcherListStreamQuery own the stream: they read it, collect the data of each event into items, and cancel it when a newer query starts, on abort() or reset(), and on unmount. Components render items and never hold a reader, so the hooks are safe under StrictMode; they render once per network chunk, not once per row. They return no result; instead:
| Field | Meaning |
|---|---|
items | The rows of the current query received so far, in order. A new query starts from an empty list, reset() empties it, and abort() or an error keeps the rows received before it. |
done | The stream ended normally and items holds every row; the same as status === 'success'. |
loading | From the request until the stream ends, fails, or is aborted. |
error | A FetcherError when the request failed, or a WowError with its errorCode when the server sent an error event in the stream. The default E is FetcherError | WowError. |
status, execute, abort, reset, getQuery, setQuery | As for the other hooks; execute() runs the current query again and aborts the stream in flight, and reset() stops it and empties items. |
onSuccess receives every row once the stream has ended. The execute option of useListStreamQuery is a ListStreamExecutor: (query, attributes?, abortController?) resolving to a ReadableStream<JsonServerSentEvent<R>>, such as a query client's listStateStream. useFetcherListStreamQuery takes url and an optional fetcher instead; it has no execute or resultExtractor option.
With a query client
A query client method, from wow-client's SnapshotQueryClient or from a generated …QueryClientFactory (createSnapshotQueryClient(...)), already has the (query, attributes, abort) shape execute takes. Pass it through, execute: (query, attributes, abortController) => client.pagedState(query, attributes, abortController), so no URL is hand-written and an abort cancels the request. There are no per-client hooks for this reason: a hook for every client method would multiply the public API without adding anything the execute option does not already give.
Use the useFetcher*Query hooks when you only have an endpoint URL. Snapshot endpoints take the form order/snapshot/paged/state (not snapshot_state/paged), and filters name state fields as state.status (not status), because snapshot queries filter on the snapshot document, whose aggregate state lives under state.
Install
React 19.3 or later is required (peer react ^19.3.0). The package is built with the React Compiler and its bundle imports react/compiler-runtime, which only React 19 has; React 18 is not supported.
pnpm add react react-dom @ahoo-wang/fetcher @ahoo-wang/fetcher-eventstream \
@ahoo-wang/fetcher-react @ahoo-wang/wow-client @ahoo-wang/wow-react@ahoo-wang/fetcher-react 5.1.3 or later is required (peer range ^5.1.3 || ^6): the hooks import only its @ahoo-wang/fetcher-react/core and @ahoo-wang/fetcher-react/fetcher subpaths, so @ahoo-wang/fetcher-wow is not installed. @ahoo-wang/fetcher-react in turn declares react-dom ^19.3.0, @ahoo-wang/fetcher-cosec, @ahoo-wang/fetcher-storage, and @ahoo-wang/fetcher-eventbus as peers; npm 7+ and pnpm 8+ install peers automatically, and Yarn users add them to the command. @ahoo-wang/wow-client must be on the same minor version as @ahoo-wang/wow-react. The package declares Node >=22.12.0. These hooks were the Wow hooks of @ahoo-wang/fetcher-react; see the migration guide.
Complete example
import { usePagedQuery } from '@ahoo-wang/wow-react';
import {
SnapshotQueryClient,
pagedQuery,
filter,
} from '@ahoo-wang/wow-client';
interface User {
id: string;
name: string;
}
const client = new SnapshotQueryClient<User>({ basePath: '/users' });
export function Users() {
const query = usePagedQuery<User>({
initialQuery: pagedQuery({ filter: filter.matchAll() }),
execute: (request, attributes, controller) =>
client.pagedState(request, attributes, controller),
});
return (
<section>
{query.error && <p role="alert">{query.error.message}</p>}
<p>{query.result?.total ?? 0}</p>
{query.result?.list.map(user => (
<p key={user.id}>{user.name}</p>
))}
</section>
);
}A list stream renders its rows as they arrive:
import { useListStreamQuery } from '@ahoo-wang/wow-react';
import {
filter,
listQuery,
type SnapshotQueryClient,
} from '@ahoo-wang/wow-client';
interface OrderState {
id: string;
status: string;
}
export function PaidOrders({
client,
}: {
client: SnapshotQueryClient<OrderState>;
}) {
const { items, done, loading, error, abort } = useListStreamQuery<OrderState>(
{
initialQuery: listQuery({ filter: filter.eq('state.status', 'PAID') }),
execute: (query, attributes, abortController) =>
client.listStateStream(query, attributes, abortController),
},
);
if (error) return <p role="alert">{error.message}</p>;
return (
<>
<ul>
{items.map(order => (
<li key={order.id}>{order.id}</li>
))}
</ul>
{loading && <button onClick={abort}>Stop</button>}
{done && <p>{items.length} orders</p>}
</>
);
}With only an endpoint URL, useFetcherListStreamQuery<OrderState>({ url: 'order/snapshot/list/state', initialQuery }) returns the same fields.
Service URLs in examples require application endpoints; type checking does not imply an external service was contacted.
Public signatures and types
These signatures follow declarations reachable from the current root entry. ? marks optional input; generics/interfaces only constrain compile-time types. Locate inherited types such as UseQueryOptions through the fetcher-react symbol index and query types through the wow-client symbol index; Condition, SingleQuery, ListQuery, PagedQuery, and the …QueryRequest unions come from @ahoo-wang/wow-client/legacy. Runtime defaults and failure behavior are described above.
useFetcherCountQuery
export function useFetcherCountQuery<
FIELDS extends string = string,
E = FetcherError,
>(
options: UseFetcherCountQueryOptions<FIELDS, E, FilterExpression<FIELDS>>,
): UseFetcherCountQueryReturn<FIELDS, E, FilterExpression<FIELDS>>;typescript/wow-react/src/fetcher/useFetcherCountQuery.ts:89
export function useFetcherCountQuery<
FIELDS extends string = string,
E = FetcherError,
>(
options: UseFetcherCountQueryOptions<FIELDS, E, Condition<FIELDS>>,
): UseFetcherCountQueryReturn<FIELDS, E, Condition<FIELDS>>;typescript/wow-react/src/fetcher/useFetcherCountQuery.ts:95
export function useFetcherCountQuery<
FIELDS extends string = string,
E = FetcherError,
Q extends Condition<FIELDS> | FilterExpression<FIELDS> =
FilterExpression<FIELDS>,
>(
options: UseFetcherCountQueryOptions<FIELDS, E, Q>,
): UseFetcherCountQueryReturn<FIELDS, E, Q>;typescript/wow-react/src/fetcher/useFetcherCountQuery.ts:101
UseFetcherCountQueryOptions
export interface UseFetcherCountQueryOptions<
FIELDS extends string = string,
E = FetcherError,
Q extends Condition<FIELDS> | FilterExpression<FIELDS> =
FilterExpression<FIELDS>,
> extends UseFetcherQueryOptions<Q, number, E> {}typescript/wow-react/src/fetcher/useFetcherCountQuery.ts:31
UseFetcherCountQueryReturn
export interface UseFetcherCountQueryReturn<
FIELDS extends string = string,
E = FetcherError,
Q extends Condition<FIELDS> | FilterExpression<FIELDS> =
FilterExpression<FIELDS>,
> extends UseQueryReturn<Q, number, E> {}typescript/wow-react/src/fetcher/useFetcherCountQuery.ts:47
useFetcherListQuery
export function useFetcherListQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UseFetcherListQueryOptions<R, FIELDS, E, FilterListQuery<FIELDS>>,
): UseFetcherListQueryReturn<R, FIELDS, E, FilterListQuery<FIELDS>>;typescript/wow-react/src/fetcher/useFetcherListQuery.ts:98
export function useFetcherListQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UseFetcherListQueryOptions<R, FIELDS, E, ListQuery<FIELDS>>,
): UseFetcherListQueryReturn<R, FIELDS, E, ListQuery<FIELDS>>;typescript/wow-react/src/fetcher/useFetcherListQuery.ts:105
export function useFetcherListQuery<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
>(
options: UseFetcherListQueryOptions<R, FIELDS, E, Q>,
): UseFetcherListQueryReturn<R, FIELDS, E, Q>;typescript/wow-react/src/fetcher/useFetcherListQuery.ts:112
UseFetcherListQueryOptions
export interface UseFetcherListQueryOptions<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
> extends UseFetcherQueryOptions<Q, R[], E> {}typescript/wow-react/src/fetcher/useFetcherListQuery.ts:30
UseFetcherListQueryReturn
export interface UseFetcherListQueryReturn<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
> extends UseQueryReturn<Q, R[], E> {}typescript/wow-react/src/fetcher/useFetcherListQuery.ts:45
useFetcherListStreamQuery
export function useFetcherListStreamQuery<
R,
FIELDS extends string = string,
E = FetcherError | WowError,
>(
options: UseFetcherListStreamQueryOptions<
R,
FIELDS,
E,
FilterListQuery<FIELDS>
>,
): UseFetcherListStreamQueryReturn<R, FIELDS, E, FilterListQuery<FIELDS>>;typescript/wow-react/src/fetcher/useFetcherListStreamQuery.ts:97
export function useFetcherListStreamQuery<
R,
FIELDS extends string = string,
E = FetcherError | WowError,
>(
options: UseFetcherListStreamQueryOptions<R, FIELDS, E, ListQuery<FIELDS>>,
): UseFetcherListStreamQueryReturn<R, FIELDS, E, ListQuery<FIELDS>>;typescript/wow-react/src/fetcher/useFetcherListStreamQuery.ts:109
export function useFetcherListStreamQuery<
R,
FIELDS extends string = string,
E = FetcherError | WowError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
>(
options: UseFetcherListStreamQueryOptions<R, FIELDS, E, Q>,
): UseFetcherListStreamQueryReturn<R, FIELDS, E, Q>;typescript/wow-react/src/fetcher/useFetcherListStreamQuery.ts:116
UseFetcherListStreamQueryOptions
export interface UseFetcherListStreamQueryOptions<
R,
FIELDS extends string = string,
E = FetcherError | WowError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
>
extends
Omit<UseListStreamQueryOptions<R, FIELDS, E, Q>, 'execute'>,
FetcherCapable {
/**
* The list endpoint, resolved against the Fetcher's `baseURL`: for example
* `order/snapshot/list/state` for the states of an `order` aggregate.
*/
url: string;
}typescript/wow-react/src/fetcher/useFetcherListStreamQuery.ts:37
UseFetcherListStreamQueryReturn
export interface UseFetcherListStreamQueryReturn<
R,
FIELDS extends string = string,
E = FetcherError | WowError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
> extends UseListStreamQueryReturn<R, FIELDS, E, Q> {}typescript/wow-react/src/fetcher/useFetcherListStreamQuery.ts:57
useFetcherPagedQuery
export function useFetcherPagedQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UseFetcherPagedQueryOptions<R, FIELDS, E, FilterPagedQuery<FIELDS>>,
): UseFetcherPagedQueryReturn<R, FIELDS, E, FilterPagedQuery<FIELDS>>;typescript/wow-react/src/fetcher/useFetcherPagedQuery.ts:99
export function useFetcherPagedQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UseFetcherPagedQueryOptions<R, FIELDS, E, PagedQuery<FIELDS>>,
): UseFetcherPagedQueryReturn<R, FIELDS, E, PagedQuery<FIELDS>>;typescript/wow-react/src/fetcher/useFetcherPagedQuery.ts:106
export function useFetcherPagedQuery<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends PagedQueryRequest<FIELDS> = FilterPagedQuery<FIELDS>,
>(
options: UseFetcherPagedQueryOptions<R, FIELDS, E, Q>,
): UseFetcherPagedQueryReturn<R, FIELDS, E, Q>;typescript/wow-react/src/fetcher/useFetcherPagedQuery.ts:113
UseFetcherPagedQueryOptions
export interface UseFetcherPagedQueryOptions<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends PagedQueryRequest<FIELDS> = FilterPagedQuery<FIELDS>,
> extends UseFetcherQueryOptions<Q, PagedList<R>, E> {}typescript/wow-react/src/fetcher/useFetcherPagedQuery.ts:35
UseFetcherPagedQueryReturn
export interface UseFetcherPagedQueryReturn<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends PagedQueryRequest<FIELDS> = FilterPagedQuery<FIELDS>,
> extends UseQueryReturn<Q, PagedList<R>, E> {}typescript/wow-react/src/fetcher/useFetcherPagedQuery.ts:52
useFetcherSingleQuery
export function useFetcherSingleQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UseFetcherSingleQueryOptions<
R,
FIELDS,
E,
FilterSingleQuery<FIELDS>
>,
): UseFetcherSingleQueryReturn<R, FIELDS, E, FilterSingleQuery<FIELDS>>;typescript/wow-react/src/fetcher/useFetcherSingleQuery.ts:94
export function useFetcherSingleQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UseFetcherSingleQueryOptions<R, FIELDS, E, SingleQuery<FIELDS>>,
): UseFetcherSingleQueryReturn<R, FIELDS, E, SingleQuery<FIELDS>>;typescript/wow-react/src/fetcher/useFetcherSingleQuery.ts:106
export function useFetcherSingleQuery<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends SingleQueryRequest<FIELDS> = FilterSingleQuery<FIELDS>,
>(
options: UseFetcherSingleQueryOptions<R, FIELDS, E, Q>,
): UseFetcherSingleQueryReturn<R, FIELDS, E, Q>;typescript/wow-react/src/fetcher/useFetcherSingleQuery.ts:113
UseFetcherSingleQueryOptions
export interface UseFetcherSingleQueryOptions<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends SingleQueryRequest<FIELDS> = FilterSingleQuery<FIELDS>,
> extends UseFetcherQueryOptions<Q, R, E> {}typescript/wow-react/src/fetcher/useFetcherSingleQuery.ts:34
UseFetcherSingleQueryReturn
export interface UseFetcherSingleQueryReturn<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends SingleQueryRequest<FIELDS> = FilterSingleQuery<FIELDS>,
> extends UseQueryReturn<Q, R, E> {}typescript/wow-react/src/fetcher/useFetcherSingleQuery.ts:50
useCountQuery
export function useCountQuery<FIELDS extends string = string, E = FetcherError>(
options: UseCountQueryOptions<FIELDS, E, FilterExpression<FIELDS>>,
): UseCountQueryReturn<FIELDS, E, FilterExpression<FIELDS>>;typescript/wow-react/src/useCountQuery.ts:84
export function useCountQuery<FIELDS extends string = string, E = FetcherError>(
options: UseCountQueryOptions<FIELDS, E, Condition<FIELDS>>,
): UseCountQueryReturn<FIELDS, E, Condition<FIELDS>>;typescript/wow-react/src/useCountQuery.ts:87
export function useCountQuery<
FIELDS extends string = string,
E = FetcherError,
Q extends Condition<FIELDS> | FilterExpression<FIELDS> =
FilterExpression<FIELDS>,
>(
options: UseCountQueryOptions<FIELDS, E, Q>,
): UseCountQueryReturn<FIELDS, E, Q>;typescript/wow-react/src/useCountQuery.ts:90
UseCountQueryOptions
export interface UseCountQueryOptions<
FIELDS extends string = string,
E = FetcherError,
Q extends Condition<FIELDS> | FilterExpression<FIELDS> =
FilterExpression<FIELDS>,
> extends UseQueryOptions<Q, number, E> {}typescript/wow-react/src/useCountQuery.ts:30
UseCountQueryReturn
export interface UseCountQueryReturn<
FIELDS extends string = string,
E = FetcherError,
Q extends Condition<FIELDS> | FilterExpression<FIELDS> =
FilterExpression<FIELDS>,
> extends UseQueryReturn<Q, number, E> {}typescript/wow-react/src/useCountQuery.ts:44
useListQuery
export function useListQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UseListQueryOptions<R, FIELDS, E, FilterListQuery<FIELDS>>,
): UseListQueryReturn<R, FIELDS, E, FilterListQuery<FIELDS>>;typescript/wow-react/src/useListQuery.ts:93
export function useListQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UseListQueryOptions<R, FIELDS, E, ListQuery<FIELDS>>,
): UseListQueryReturn<R, FIELDS, E, ListQuery<FIELDS>>;typescript/wow-react/src/useListQuery.ts:100
export function useListQuery<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
>(
options: UseListQueryOptions<R, FIELDS, E, Q>,
): UseListQueryReturn<R, FIELDS, E, Q>;typescript/wow-react/src/useListQuery.ts:107
UseListQueryOptions
export interface UseListQueryOptions<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
> extends UseQueryOptions<Q, R[], E> {}typescript/wow-react/src/useListQuery.ts:32
UseListQueryReturn
export interface UseListQueryReturn<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
> extends UseQueryReturn<Q, R[], E> {}typescript/wow-react/src/useListQuery.ts:47
useListStreamQuery
export function useListStreamQuery<
R,
FIELDS extends string = string,
E = FetcherError | WowError,
>(
options: UseListStreamQueryOptions<R, FIELDS, E, FilterListQuery<FIELDS>>,
): UseListStreamQueryReturn<R, FIELDS, E, FilterListQuery<FIELDS>>;typescript/wow-react/src/useListStreamQuery.ts:127
export function useListStreamQuery<
R,
FIELDS extends string = string,
E = FetcherError | WowError,
>(
options: UseListStreamQueryOptions<R, FIELDS, E, ListQuery<FIELDS>>,
): UseListStreamQueryReturn<R, FIELDS, E, ListQuery<FIELDS>>;typescript/wow-react/src/useListStreamQuery.ts:134
export function useListStreamQuery<
R,
FIELDS extends string = string,
E = FetcherError | WowError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
>(
options: UseListStreamQueryOptions<R, FIELDS, E, Q>,
): UseListStreamQueryReturn<R, FIELDS, E, Q>;typescript/wow-react/src/useListStreamQuery.ts:141
UseListStreamQueryOptions
export interface UseListStreamQueryOptions<
R,
FIELDS extends string = string,
E = FetcherError | WowError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
> extends Omit<UseQueryOptions<Q, R[], E>, 'execute'> {
/** Opens the stream for a query. */
execute: ListStreamExecutor<R, Q>;
}typescript/wow-react/src/useListStreamQuery.ts:51
UseListStreamQueryReturn
export interface UseListStreamQueryReturn<
R,
FIELDS extends string = string,
E = FetcherError | WowError,
Q extends ListQueryRequest<FIELDS> = FilterListQuery<FIELDS>,
> extends Omit<UseQueryReturn<Q, R[], E>, 'result'> {
/** The rows of the current query received so far. */
items: R[];
/** Whether the stream ended normally, so `items` holds every row. */
done: boolean;
}typescript/wow-react/src/useListStreamQuery.ts:76
ListStreamExecutor
export type ListStreamExecutor<R, Q> = (
query: Q,
attributes?: Record<string, any>,
abortController?: AbortController,
) => Promise<ReadableStream<JsonServerSentEvent<R>>>;typescript/wow-react/src/useListStreamQuery.ts:33
usePagedQuery
export function usePagedQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UsePagedQueryOptions<R, FIELDS, E, FilterPagedQuery<FIELDS>>,
): UsePagedQueryReturn<R, FIELDS, E, FilterPagedQuery<FIELDS>>;typescript/wow-react/src/usePagedQuery.ts:95
export function usePagedQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UsePagedQueryOptions<R, FIELDS, E, PagedQuery<FIELDS>>,
): UsePagedQueryReturn<R, FIELDS, E, PagedQuery<FIELDS>>;typescript/wow-react/src/usePagedQuery.ts:102
export function usePagedQuery<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends PagedQueryRequest<FIELDS> = FilterPagedQuery<FIELDS>,
>(
options: UsePagedQueryOptions<R, FIELDS, E, Q>,
): UsePagedQueryReturn<R, FIELDS, E, Q>;typescript/wow-react/src/usePagedQuery.ts:109
UsePagedQueryOptions
export interface UsePagedQueryOptions<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends PagedQueryRequest<FIELDS> = FilterPagedQuery<FIELDS>,
> extends UseQueryOptions<Q, PagedList<R>, E> {}typescript/wow-react/src/usePagedQuery.ts:35
UsePagedQueryReturn
export interface UsePagedQueryReturn<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends PagedQueryRequest<FIELDS> = FilterPagedQuery<FIELDS>,
> extends UseQueryReturn<Q, PagedList<R>, E> {}typescript/wow-react/src/usePagedQuery.ts:50
useSingleQuery
export function useSingleQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UseSingleQueryOptions<R, FIELDS, E, FilterSingleQuery<FIELDS>>,
): UseSingleQueryReturn<R, FIELDS, E, FilterSingleQuery<FIELDS>>;typescript/wow-react/src/useSingleQuery.ts:92
export function useSingleQuery<
R,
FIELDS extends string = string,
E = FetcherError,
>(
options: UseSingleQueryOptions<R, FIELDS, E, SingleQuery<FIELDS>>,
): UseSingleQueryReturn<R, FIELDS, E, SingleQuery<FIELDS>>;typescript/wow-react/src/useSingleQuery.ts:99
export function useSingleQuery<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends SingleQueryRequest<FIELDS> = FilterSingleQuery<FIELDS>,
>(
options: UseSingleQueryOptions<R, FIELDS, E, Q>,
): UseSingleQueryReturn<R, FIELDS, E, Q>;typescript/wow-react/src/useSingleQuery.ts:106
UseSingleQueryOptions
export interface UseSingleQueryOptions<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends SingleQueryRequest<FIELDS> = FilterSingleQuery<FIELDS>,
> extends UseQueryOptions<Q, R, E> {}typescript/wow-react/src/useSingleQuery.ts:35
UseSingleQueryReturn
export interface UseSingleQueryReturn<
R,
FIELDS extends string = string,
E = FetcherError,
Q extends SingleQueryRequest<FIELDS> = FilterSingleQuery<FIELDS>,
> extends UseQueryReturn<Q, R, E> {}typescript/wow-react/src/useSingleQuery.ts:50
Related topics
Fetcher hooks · Promise and query state · Snapshot queries · Filter expressions · Projection, sorting and pagination · Storybook: Wow query hooks