Docs
  • RxFx
  • What Problems Does It Solve?
  • How do I get started?
  • Why An Event Bus?
    • Why Not Native DOM Events?
  • Why Observables, not just Promises?
    • Why not raw RxJS?
    • How does RxFx simplify working with Observables?
  • Example Apps
  • Fundamentals
    • Concurrency Modes
    • API Docs
  • Examples
    • Ping Pong (bus.listen)
      • Pure JS
      • Testing Ping Pong
    • Alarm Clock
    • Animation 60FPS
  • Integrations
    • Overview
Powered by GitBook
On this page
  1. Why An Event Bus?

Why Not Native DOM Events?

In short—portability. To have an Event Bus that works just as well in the DOM as on React Native, in NodeJS or Deno makes it usable across even more teams, breaking down more silos.

Also, DOM Native event listeners don't have built-in the notion of async handlers and Concurrency Strategies, since they don't "Return The Work".

Lastly, the bubble/capture model, and stopPropogation and preventDefault methods on events are not really needed once the source of events is abstracted out of the DOM, so you get a simpler API with the Event Bus abstraction.

Just trigger, filter and listen your way to framework-independent effect and state management!

PreviousWhy An Event Bus?NextWhy Observables, not just Promises?

Last updated 2 years ago