React Query - Update data after successful mutation

Using vanilla react query I was used to use one of these options. What are the options with tRPC? Since queryClient doesn't provide any of these methods. const queryClient = trpc.useContext();
// Normal React Query
queryClient.setQueryData(['posts', id], newPost)
queryClient.invalidateQueries(['posts', id, 'comments'])
// Normal React Query
queryClient.setQueryData(['posts', id], newPost)
queryClient.invalidateQueries(['posts', id, 'comments'])
3 Replies
venus
venusOP3y ago
I am using latest T3 beta stack along with React Query V4
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
venus
venusOP3y ago
Thanks
Want results from more Discord servers?
Add your server