Overview of Operators in RxJS

Get introduced to the operators and their types in RxJS.

We'll cover the following

In the previous sections, you were introduced to the world of reactive programming, and you were able to see how Observables can ease your programming life. You were also introduced to the concept of a data pipeline, where all the fun happens, and you learned how several sequential operations is applied to the data passing through the pipeline in order to transform it and adapt it to Observer needs.

What are operators

An operator is a pure function that can be applied to the data flowing in the pipeline at any point. By pure function, we mean that it doesn’t change any external state, and it doesn’t change the Observable that pushed the value into the pipeline where this function operates. Instead, it produces a new Observable that will flow down the pipeline.

Operator categories

In this section, you will be introduced to the most common RxJS operators that make data transformation seamless. We have organized these operators in different categories based on their functionality:

  1. Creation operators

  2. Combination operators

  3. Filtering operators

  4. Transformation operators

Once you get familiar with some operators from each category, you will be able to build powerful data pipelines to tackle different problems.

At the end of this chapter, you will be able to make your own custom operator and understand the inner working of each operator out there.

Let’s get our hands dirty!

Get hands-on with 1200+ tech skills courses.