Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const handler = (event) => {
- //do stuff with the event
- }
- const remover = subscribe(handler)
- // other stuff happens
- // ...
- // no we remove the listener
- remover()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement