Skip to content

Manage multiple event handlers using few event listeners

License

Notifications You must be signed in to change notification settings

lencioni/consolidated-events

Repository files navigation

consolidated-events Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

Manage multiple event handlers using few event listeners.

Example

import { addEventListener } from 'consolidated-events';

const removeEventListener = addEventListener(
  window,
  'scroll',
  () => { console.log('scrolling') },
  { passive: true }
);

...

removeEventListener();

About

Manage multiple event handlers using few event listeners

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •