T3 Stack · Hook
useQuery
useQuery calls a tRPC procedure from a frontend with inferred types and autocomplete. It uses the TanStack React Query integration, so inputs and returned data stay connected to the backend types.
Last updated
Syntax
trpc.<router>.<procedure>.useQuery(input)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
@tanstack/react-querytRPC clientroutersproceduresbackend validatorautocomplete