The Rx Pattern and the Observable

While the Observer and the Iterator patterns are powerful in their own right, the combination of both is even better. We call this the Rx pattern, named after the Reactive Extensions libraries.[10] We’ll be using this pattern for the rest of the book.

The Observable sequence, or simply Observable is central to the Rx pattern. An Observable emits its values in order—like an iterator—but instead of its consumers requesting the next value, the Observable “pushes” values to consumers as they become available. It has a similar role to the Producer’s in the Observer pattern: emitting values and pushing them to its listeners.

Get Reactive Programming with RxJS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.