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

consecutive dispatches can lead to incorrect update order #1262

Closed
MrWolfZ opened this issue Apr 26, 2019 · 0 comments · Fixed by #1263
Closed

consecutive dispatches can lead to incorrect update order #1262

MrWolfZ opened this issue Apr 26, 2019 · 0 comments · Fixed by #1263

Comments

@MrWolfZ
Copy link
Contributor

MrWolfZ commented Apr 26, 2019

Do you want to request a feature or report a bug?

bug

What is the current behavior?

When two dispatches are performed consecutively inside a batch and the second dispatch does not change the result of mapState of a connected component, it will notify its children of the second dispatch before it re-renders itself, leading to potential stale props in the children.

This sandbox demonstrates the issue.

What is the expected behavior?

Even with consecutive dispatches react-redux should ensure top-down update order.

Which versions of React, ReactDOM/React Native, Redux, and React Redux are you using? Which browser and OS are affected by this issue? Did this work in previous versions of React Redux?

This bug affects versions >=7.0.0 of react-redux.

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 a pull request may close this issue.

1 participant