Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upseparate event handler functions for an event attached to different inputs or one event handler function with lot of if statements/ switch statement? #1783
Labels
Comments
|
This really isn’t the kind of thing this guide currently addresses, but personally I’d tend towards separate ones - it’s easier to unit test, and when something goes wrong, you have way less code to debug. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
separate event handler functions for an event attached to different inputs or one event handler function with lot of if statements/ switch statement?