Skip to content

API reference > @kontsedal/olas-react > UseQueryResult

UseQueryResult type ​

What useQuery returns: every AsyncState signal read as a plain value, plus its actions. The component re-renders only when a field it reads changes.

Signature:

typescript
type UseQueryResult<T> = {
  data: T | undefined;
  error: unknown | undefined;
  status: AsyncStatus;
  isLoading: boolean;
  isFetching: boolean;
  isStale: boolean;
  isPaused: boolean;
  isEnabled: boolean;
  lastUpdatedAt: number | undefined;
  hasPendingMutations: boolean;
  refetch: () => Promise<T>;
  reset: () => void;
  cancel: () => void;
};

References: AsyncStatus

Released under the MIT License.