Skip to content

Conversation

@wtanna
Copy link
Contributor

@wtanna wtanna commented Jun 26, 2020

By having isLatest be a function it was only setting the data if it
was the last mutation being run, which then called all the callbacks with that
one set of data. With this adjustment every mutation will call every callback.

This change fixes this issue: #241

tannerlinsley added a commit that referenced this pull request Jun 27, 2020
Fixes #249

Now all we need is the new test from #641
@tannerlinsley
Copy link
Member

I fixed this in a bit of a different way, but the test here is great. Can you isolate the test and drop the rest of the changes and then we can merge this?

Adds callback tests for when the `mutate` function is called multiple
times in a row.
@tannerlinsley tannerlinsley merged commit dbef038 into TanStack:master Jun 27, 2020
@tannerlinsley
Copy link
Member

🎉 This PR is included in version 2.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@wtanna wtanna deleted the wt/async-useMutation branch June 29, 2020 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants