{s}omniamarkets

@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / react / IndexerQueryState

Interface: IndexerQueryState<T>

Defined in: hooks.ts:273

The state one useIndexerQuery exposes.

Type Parameters

T

T

Properties

data

data: T | undefined

Defined in: hooks.ts:278

Latest successful result — undefined until the first response lands; the previous value is kept while a refetch is in flight or after it fails.


loading

loading: boolean

Defined in: hooks.ts:280

True while a request is in flight (initial load and refetches alike).


error

error: Error | null

Defined in: hooks.ts:282

The most recent request's failure, or null. Cleared when a new request starts.


refetch

refetch: () => void

Defined in: hooks.ts:284

Re-run the query imperatively (e.g. a manual refresh button).

Returns

void