rxjs - npm 52M downloads/week!
Reactive Extensions Library for JavaScript
RxJS is a library for reactive programming using Observables, to make it easier to compose asynchronous or callback-based code.
Normally you register event listeners.
document.addEventListener('click', () => console.log('Clicked!'));
Using RxJS you create an observable instead.
import { fromEvent } from 'rxjs';
fromEvent(document, 'click').subscribe(() => console.log('Clicked!'));
No comments:
Post a Comment