Skip to content

how to type a useMutation fetch function? #4531

Answered by TkDodo
hiwyn asked this question in General
Discussion options

You must be logged in to vote

a mutation can only accept one parameter, not many. if you need multiple parameters, pass an object.

https://tkdodo.eu/blog/mastering-mutations-in-react-query#mutations-only-take-one-argument-for-variables

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hiwyn
Comment options

Answer selected by hiwyn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants