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

slightly simplify the example #1

Closed
capaj opened this issue Oct 25, 2018 · 2 comments
Closed

slightly simplify the example #1

capaj opened this issue Oct 25, 2018 · 2 comments

Comments

@capaj
Copy link

capaj commented Oct 25, 2018

the example could be simplified:
https://codesandbox.io/s/0yyomw1l4p

but maybe it's just my personal preference. Feel free to just ignore and close this.

@mfpiccolo
Copy link

I came here to suggest this. :)

@mweststrate
Copy link
Collaborator

Thanks for the suggestion :-). it is what I would probably do as well in practice in this specific case, but if the event handlers are slightly bigger, then extracting a separate function is the more maintainable approach I think, and hence the best practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants