Reconciler missing last batch
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:
- Run https://github.com/agg23/NodeGUIReconcilerRepro
- Click the "Click" button, which will start a timer rapidly counting up to 5.
- Notice that it reads "4 ticks" instead of "5 ticks". Click the "Update" button to force an update.
- Notice that it now reads "5 ticks", but the force update count still reads 0.
- 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
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