T
TanStack3y ago
optimistic-gold

useMutation (onMutate) is missing.

Hello.. I was using useMutation and created a reusable function as you can see on the left hand side of the image. Now, when I use that function on the right hand side of the image I haven't get any onMutate options. What did I miss here? Thank you.
No description
2 Replies
ratty-blush
ratty-blush3y ago
onMutate only exists as a callback on useMutation, not on mutate itself
optimistic-gold
optimistic-goldOP3y ago
Ohh ok... Got it. Thank you for clarification. :reactquery:

Did you find this page helpful?