...

/

General Use of Schedulers in RxJS

General Use of Schedulers in RxJS

Learn about the usage of different types of Schedulers.

We'll cover the following...

A Scheduler is a mechanism that is used to “schedule” an action to happen in the future. Each operator in RxJS uses one Scheduler internally, which is selected to provide the best performance in the most likely scenario.

Let’s see how we can change the Scheduler in operators and the consequences of doing so. But first, let’s create an array with 1000 integers in it:

Press + to interact
var arr = [];
for (var i=0; i<1000; i++)
{
arr.push(i);
}

Then, let’s create an Observable from arr and force it to emit all the notifications by subscribing to it. In ...

Access this course and 1400+ top-rated courses and projects.