O'Reilly logo

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond by JD Isaacks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 33. Observables

After reading lesson 33, you will be able to

  • Create your own observables
  • Subscribe to observables
  • Compose new observables with higher-order combinator functions
  • Create your own combinator functions for composing observables

Observables are objects in which you can subscribe to streams of data. Observables are like promises, but whereas a promise only resolves or rejects once, an observable can keep emitting new values indefinitely. If you were to think of promises as an asynchronous datum that you can wrap around setTimeout, observables would be the asynchronous data that you can wrap around setInterval.

Note

In order to use observables today, at the time of this writing, you need to use one of the open ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required