You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optimistic updates in React Query 5 can be simpler by using the useMutationState anywhere in the application to hook into a running mutation state and variables
Describe the feature you'd like to request
Optimistic updates in React Query 5 can be simpler by using the
useMutationState
anywhere in the application to hook into a running mutation state and variableshttps://tanstack.com/query/latest/docs/framework/react/guides/optimistic-updates#via-the-ui
Describe the solution you'd like to see
I would love if tRPC exposed a
api.createPost.useMutationState()
hookDescribe alternate solutions
useMutationState()
on my own and reconstruct the mutation key, but I understand this is an implementation detail and not exposed by tRPCapiUtils.createPost.mutationState()
Additional information
No response
👨👧👦 Contributing
Funding
The text was updated successfully, but these errors were encountered: