Skip to content
masterclass Buddy

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.

Subscribe
  • tRPC
  • React Query
  • useQuery
  • useMutation
  • optimistic updates
  • onMutate
  • onError
  • onSettled

Source: tRPC • Create T3 App. Checked 2026-11-03.