Cyber Monday Sale 40% off unlimited courses & creative assets! 40% off unlimited assets! Save Now
  • Overview
  • Transcript

1.2 Reactive Programming With RxJS

In this lesson I’ll show you how to use the RxJS library to create an Observable to watch and respond to changing data. Afterwards I’ll show you some operators that we can use to extract and parse the observable’s data.

Code Snippet:

Here is an example of an Observable used to debounce button clicks. This will ignore any double or multiple clicks that happen within one second of the first click.

let button = document.querySelector('button');
Rx.Observable.fromEvent(button, 'click')
    .scan(count => count + 1, 0)
    .subscribe(count => console.log(`Clicked ${count} times`));

1.Reactive Programming With RxJS
2 lessons, 09:37

Free Lesson

Reactive Programming With RxJS

1.2 Reactive Programming With RxJS

Back to the top