@honua/sdk-js
    Preparing search index...

    Interface UseQueryResult<T>

    Result of useQuery: a stable snapshot plus a refetch trigger.

    interface UseQueryResult<T> {
        data: Result<T> | undefined;
        dataUpdatedAt?: number;
        error: unknown;
        isFetching: boolean;
        isLoading: boolean;
        refetch: () => void;
        status: QueryStatus;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Properties

    data: Result<T> | undefined

    Last resolved value. Preserved across background refetches.

    dataUpdatedAt?: number

    Epoch milliseconds of the last successful fetch, undefined until one resolves. Drives stale-while-revalidate decisions.

    error: unknown

    Last rejection reason, cleared on the next successful fetch.

    isFetching: boolean

    True whenever a fetch is in flight, including background refetches.

    isLoading: boolean

    True only while the first fetch (no data yet) is in flight.

    refetch: () => void

    Force a fresh fetch, superseding any in-flight request.

    status: QueryStatus