Replace Observable.create with Observable creation helpers

InstructorAndré Staltz

Share this video with your friends

Send Tweet

In this lesson we will learn about potential problems that may arise when using Observable.create, a low-level function for creating Observables. In its place, we will use easier helper functions that create Observables in a safe manner.

Fernando Catacora
~ 4 years ago

How can listen to different events? For example, I have function with a callback and when the callback is called I want the Observale listen for that call. At this point fromEvent just lister for click, windowresize, etc.

Will Johnson
~ 4 years ago

How can listen to different events? For example, I have function with a callback and when the callback is called I want the Observale listen for that call. At this point fromEvent just lister for click, windowresize, etc.

Hi Fernando, have you looked into the bindCallback method? https://rxjs-dev.firebaseapp.com/api/index/function/bindCallback