Skip to content

Mutate on event #2516

Answered by TkDodo
TrueWill asked this question in Ideas
Discussion options

You must be logged in to vote

As opposed to queries, mutations don’t run automatically. Just call the mutate function that gets returned from useMutation when you click the button, like in the documentation here: https://react-query.tanstack.com/guides/mutations

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TrueWill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants