Skip to content

useMutation calls function twice when I don't have retry set up #1649

Answered by martinzokov
martinzokov asked this question in Q&A
Discussion options

You must be logged in to vote

Ha! I figured it out... I was being a dummy and finally understood that I should not have the API call in the onMutate callback. It was calling it once as the first parameter to useMutation and a second time because of the onMutate call. I had just misunderstood the docs :) Feel free to delete this discussion.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by martinzokov
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants