Closed microbit-robert closed 2 years ago
The simulated click seemingly has no delay between mousedown and mouseup which is causing us to end up with unpredictable state in an already complex component. Switching from using state to refs seems to fix the issue, though I'm having trouble reasoning about this change and haven't explored the potential for any unwanted side effects of doing so.
Code-wise this makes sense to me. We only use mouseDown in event handlers and need it to be up-to-date (can't wait for a re-render). I'll play with it some more then approve.
Review link (not sure why missing):
Closes #984.