Skip to main content

useLazyLoadQueryWithRefresh

Callable

  • useLazyLoadQueryWithRefresh<TChainId, TQuery>(query: TQuery, options?: Partial<ChainOptions<TChainId>>): [data: InferQueryArgumentResult<TChainId, TQuery>, refresh: () => void]
  • useLazyLoadQueryWithRefresh<TChainIds, TOptions>(options: TOptions & { [ P in string | number | symbol ]: QueryOptions<TChainIds[P<P>]> }): [data: { [ P in keyof TOptions ]: InferQueryArgumentResult<TOptions[P][chainId], TOptions[P][query]> }, refresh: () => void]

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


    Type parameters

    • TChainId: any
    • TQuery: any

    Parameters

    • query: TQuery

      The function to create the query

    • optionaloptions: Partial<ChainOptions<TChainId>>

      Additional options

    Returns [data: InferQueryArgumentResult<TChainId, TQuery>, refresh: () => void]

    The data response & a function to refresh it