DEV Community

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

Collapse
 
ptifur profile image
Y

Thanks for the insights! With these corrections both methods work indeed!

Is there a reason to prefer one over the other?