RxJS Crash Course – Click events

0

We don’t normally need to create observables manually like in the previous article. Let’s say we wanted to create an observable from click events in the DOM. We can call observable from event pass at the document and the event we want to observe in this case clicks so just like before we subscribe to it.

RxJS Crash Course - Click events
RxJS Crash Course – Click events

But at this time, we’ll console.log() it just to show the full event object each time we click the page we get the mouse event logged along with all of its associated data.

Next article:

0