Basic Sequence Operators

Among the dozens of operators that transform Observables in RxJS, the most used are those that any language with decent collection-processing abilities also have: map, filter, and reduce. In JavaScript, you can find these operators in Array instances.

RxJS follows JavaScript conventions, so you’ll find that the syntax for the following operators is almost the same as for array operators. In fact, we’ll show the implementation using both arrays and Observables to show how similar the two APIs are.


map is the sequence transformation operator most used. It takes an Observable and a function and applies that function to each of the values in the source Observable. It returns a new Observable with the transformed values. ...

Get Reactive Programming with RxJS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.