trpc.user.getUser.useQuery

Does anyone know how to call onSuccess using the above wrapper of useQuery?
3 Replies
shikishikichangchang
I've tried multiple things but can't seem to get it working. I need to pass it a query key, and an onSuccess callback
cje
cje3y ago
useQuery() | tRPC
The hooks provided by @trpc/react-query are a thin wrapper around @tanstack/react-query. For in-depth information about options and usage patterns, refer to their docs on queries.
cje
cje3y ago
Opts is the second arg
Want results from more Discord servers?
Add your server