DEV Community

Discussion on: Why pressing the key works only once in my React project?

Collapse
snorkypie profile image
Steeve Lennmark

You still want to remove the event listener on unmount in the second example though!