LiveLoveApp logo

Exercise - Observer


The goal of this exercise is to become familiar with using Observables.

  1. Open exercise on codesandbox.
  2. I've already imported the Observable class for you.
  3. New up the Observable with the subscriber function with a single Subscriber parameter.
  4. Create a new interval that delivers a next notification to all observers every 1 second.
  5. After 10 seconds deliver a complete notification to all observers.
  6. Be sure to return a teardown function to clear the interval.
  7. Subscribe to the Observable with an Observer object.