-
I'm playing with beta3 and trying to make a custom hook, and I'm getting a type error that I need to provide 4 types to useMutation options. I can't figure out what the TContext type is supposed to be. Here is an example
|
Beta Was this translation helpful? Give feedback.
Answered by
boschni
Oct 22, 2020
Replies: 1 comment 1 reply
-
It's the value returned from the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
dusty
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's the value returned from the
onMutate
callback: https://react-query-beta.tanstack.com/guides/optimistic-updates . But theUseMutationOptions
generics should have defaults so I added them in the latest beta.