clementmihailescu/Snake-Game-Reverse-LL-Tutorial

Remove event handler during useEffect teardown

Opened this issue · 0 comments

Given that handleKeyDown is initialized every time <Board/> is rendered, returning a lambda that calls removeEventListener might be required in the hook (I think)