useQuery
INFO
Full page coming soon. In the meantime, see useContextQuery, they share the same input shape.
useQuery is the component-scoped version of useContextQuery. Calls in the same hook invocation batch into one multicall, but the hook does not fuse with other components. Reach for it when you need per-hook options: blockNumber, paused, refetchInterval, or batchSize.
tsx
import { useQuery } from '@dappql/react'
const { data } = useQuery(
{ supply: Token.call.totalSupply() },
{ blockNumber: 44_500_000n, paused: !shouldFetch },
)For most app code, prefer useContextQuery.