Observer: reacting to an order

Announce that something happened with the platform's EventTarget, and let any number of subscribers react.

Level Intermediate

What you will see

  1. One order, three reactions
  2. The order calls everyone
  3. The platform is the subject
  4. Subscribers, wired in one place
  5. One failure stays one failure
  6. When not to use it

Before / after

Base: observer-base-jsView the diff

Exercises