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

    Function useQuery

    • Execute a contract Query against a Source with loading / error / data state. Results are cached per (source, query-hash) inside the provider and are referentially stable until the data changes. The request is aborted when the component unmounts or the query key changes; superseded responses are ignored (no races).

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      Returns UseQueryResult<T>

      const { data, isLoading, error, refetch } = useQuery(
      dataset.source("incidents"),
      { pagination: { limit: 100 }, returnGeometry: true },
      );