forked from vasanthk/react-bits
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: Add alternative to event switch
Another way of handling multiple events and avoid boilerplate is to use a `handlers` map. This makes sure that all handler calls are performed in O(1) instead of O(n) for worst case scenario. Signed-off-by: Adrian Oprea <[email protected]>
- Loading branch information
1 parent
576cda6
commit 288f73d
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters