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

Reconciler missing last batch #230

Open
agg23 opened this issue Jun 14, 2020 · 0 comments
Open

Reconciler missing last batch #230

agg23 opened this issue Jun 14, 2020 · 0 comments

Comments

@agg23
Copy link
Contributor

agg23 commented Jun 14, 2020

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:

  1. Run https://github.com/agg23/NodeGUIReconcilerRepro
  2. Click the "Click" button, which will start a timer rapidly counting up to 5.

Screen Shot 2020-06-14 at 8 29 15 AM

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 2

Expected behavior
The expected behavior is visible in the following repo, using ReactDOM instead of NodeGUI: https://github.com/agg23/ReactDOMReconcilerRepro

Screen Shot 2020-06-14 at 8 29 47 AM

Following the above steps leads to expected updates after every button press.

Desktop (please complete the following information):

  • OS: macOS 10.15.5
  • NodeGUI 0.22.0
  • React NodeGUI 0.8.0
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

No branches or pull requests

1 participant