DEV Community

Discussion on: Why Is This An "Anti-Pattern" in React???

 
bytebodger profile image
Adam Nathaniel Davis

Ahh, I see what you're getting at. And yeah, that's why I wrote my example outside the function, because you can't register it at runtime.