juhojo / corejumper

Platformer game
MIT License
2 stars 0 forks source link

Keydown handler becomes unresponsive #1

Closed ilpoo closed 7 years ago

ilpoo commented 7 years ago

Spamming navigation (right & left arrow keys) causes keydown handler to break.

juhojo commented 7 years ago

ReactTransitionGroup (RTG) allows canceling an animation which resets the view but does not re-trigger componentDidMount method which we originally used to set keybinds. This was solved using RTG's componentDidEnter method to re-ensure that the keybinds get reapplied when the animation is canceled.