Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: useMutation onSuccess, onError, onSettled now have access to variables #274

Merged
merged 1 commit into from Mar 23, 2020

Conversation

franleplant
Copy link
Contributor

@franleplant franleplant commented Mar 22, 2020

Issue 268

  • Now useMutation onSuccess, onError and onSettled receive as a new argument the mutation variables
  • added documentation and examples to convey this fact
  • added examples to be a bit more clear that the mutationFn needs to be a function that receives a single argument in the form of an object (instead of using multiple arguments, one for each argument the user needs to pass to the mutation function).

Let me know what you think @tannerlinsley

@tannerlinsley tannerlinsley merged commit ae2cb8d into TanStack:master Mar 23, 2020
@franleplant
Copy link
Contributor Author

franleplant commented Mar 23, 2020 via email

@tannerlinsley
Copy link
Collaborator

tannerlinsley commented Mar 23, 2020 via email

@franleplant
Copy link
Contributor Author

franleplant commented Mar 23, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants