Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upReconciler missing last batch #230
Open
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
It appears that under rapid rerender conditions, the React batching system is not flushing the final batch after the rapid updates subside. This results in strange functionality where components are partially updated with some new and some old values.
Note: The repro use Redux, so it's possible that the issues is caused by some Redux bug (perhaps in the nonstandard alternate renderers). Notably, the aforementioned bug talks about Redux itself providing a noop for the batching mechanism, so assumedly there is no batching on the Redux side.
To Reproduce
Steps to reproduce the behavior:

3. Notice that it reads "4 ticks" instead of "5 ticks". Click the "Update" button to force an update. 4. Notice that it now reads "5 ticks", but the force update count still reads 0. 5. Click "Update" again. Notice that the force update count has now updated to read the proper value of 2Expected behavior
The expected behavior is visible in the following repo, using ReactDOM instead of NodeGUI: https://github.com/agg23/ReactDOMReconcilerRepro
Following the above steps leads to expected updates after every button press.
Desktop (please complete the following information):