useMutation
- undocumented variables
returned by useMutation
#5082
-
I recently discovered that My question is: why is it not documented here? https://tanstack.com/query/v4/docs/react/reference/useMutation Should it not be used? We have a few use cases where it would come in handy. For example, in a list of buttons which all call the same |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can use it, I'm not sure if I changed the behaviour slightly with v5, because what you are describing will be a first class pattern in v5: https://tanstack.com/query/v5/docs/react/guides/optimistic-updates#via-the-ui I just realised that I forgot to update the v5 reference docs to mention variables. If you want, you can contribute that to the |
Beta Was this translation helpful? Give feedback.
You can use it, I'm not sure if I changed the behaviour slightly with v5, because what you are describing will be a first class pattern in v5:
https://tanstack.com/query/v5/docs/react/guides/optimistic-updates#via-the-ui
I just realised that I forgot to update the v5 reference docs to mention variables. If you want, you can contribute that to the
alpha
branch.