- "An Observable in any number of things over any amount of time."
- Observables don't do anything until you call subscribe. This is an advantage because they are "lazy" whereas promises are not. As soon as you create a promise it's already being sent off trying to become resolved.
- You can also cancel an Observable with the "unsubscribe" method (good luck trying to cancel a promise- hint: you can't!).
- Operators allow you to compose new observables from existing observables.
- Observables are "cold" by default. A "hot" Observable has many consumers on one producer. You can call .share() on an Observable to make it hot.
Some code to chew on:
The posts on this site are written and maintained by Jim Lynch. About Jim...