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')
    .debounce(1000)
    .scan(count => count + 1, 0)
    .subscribe(count => console.log(`Clicked ${count} times`));

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

Free Lesson
1.1
Introduction
00:39

1.2
Reactive Programming With RxJS
08:58


1.2 Reactive Programming With RxJS

Back to the top