Typescript error with useMutation in vscode #5435
Unanswered
rieger-jared
asked this question in
Q&A
Replies: 1 comment
-
your mutationFunction takes in 3 arguments, but it can only take one argument: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm having issues with using the code example of useMutation in the docs. The following code snippet generates the type error
My mutation function and mutate query look like this.
Don't know why it's complaining about the mutationFn key prop not existing. I took mutation function from this doc.
https://tanstack.com/query/v4/docs/react/guides/invalidations-from-mutations
Also what's weird, in another file I have this mutation
And vscode doesn't complain at all about this...
thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions