Skip to main content

useLazyLoadQueryWithRefresh

Callable

  • useLazyLoadQueryWithRefresh<TChainId, TQuery>(query: TQuery, options?: ChainHookOptions<TChainId>): [data: InferQueryArgumentResult<TChainId, TQuery>, refresh: (...args: []) => 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: ChainHookOptions<TChainId>

      Additional options

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

    The data response & a function to refresh it