Skip to content

Node.js events and emitters

If you’re just coding in JavaScript, then maybe the built-in events are fine, but otherwise, you may want a library to handle events.

  • mitt is very small and can handle TypeScript, although at the time of writing, there’s an issue preventing it from working with NodeNext as the module option in your tsconfig.
  • typed-event-emitter is a good fallback, although it requires the use of a class.