Skip to main content

useLazyLoadQueryWithRefresh()

function useLazyLoadQueryWithRefresh<TChainId, TQuery>(query, options?): [InferQueryArgumentResult<TChainId, TQuery>, () => void];

Defined in: packages/react/src/hooks/use-query.ts:126

Hook for querying data from chain, returning the response & a refresher function.

Type Parameters

Type Parameter
TChainId extends string | number | undefined
TQuery extends QueryArgument<TChainId>

Parameters

ParameterTypeDescription
queryTQueryThe function to create the query
options?Partial<ChainOptions<TChainId>>Additional options

Returns

[InferQueryArgumentResult<TChainId, TQuery>, () => void]

The data response & a function to refresh it

Deprecated

Use useLazyLoadQuery with FetchOptions.fetchKey | options.fetchKey instead