Rxjs
Webinar: Observables For All
  •  

Observables vs. Promises

In this section, we are going to discuss how observables compare to promises.

Here is the link to the stackblitz referenced in the video above: https://stackblitz.com/edit/observables4all

How promises and observables are similar:

  • They both have a simple constructor that only takes one parameter
  • They both inject what you need to handle success or a failure scenario
  • You can subscribe to either one of them using the .then for a promise or .subscribe for the observable method
 

I finished! On to the next chapter