Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache your React event listeners to improve performance #28

Open
fmontes opened this issue Jul 13, 2019 · 0 comments
Open

Cache your React event listeners to improve performance #28

fmontes opened this issue Jul 13, 2019 · 0 comments
Labels

Comments

@fmontes
Copy link
Owner

fmontes commented Jul 13, 2019

https://dev.to/charlesstover/cache-your-react-event-listeners-to-improve-performance-3i76

<Button onClick={() => alert('!')} />

onClick handler, despite being exactly the same, is being created every render call. Each render, a new function is created (because it is created in the render function) in memory


c0snwqrl5r77tcaz4f1j

Best approach.

@fmontes fmontes added the react label Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant