T3 Stack · Hook
useUtils
useUtils provides tRPC helpers for reading and changing cached query data. It is useful for optimistic updates and for refreshing data after a mutation.
Last updated
Syntax
const utils = api.useUtils();In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
tRPCReact QueryuseQueryuseMutationoptimistic updatesonMutateonErroronSettled