Convert an underlying source of data into an Observable

André Staltz
InstructorAndré Staltz

Share this video with your friends

Send Tweet

While there are many cases where we often believe that an RxJS Subject is necessary, there is a way of avoiding them. In this lesson we will see how to identify the underlying source of data and convert it into an Observable, essentially eliminating the use of an error-prone Subject.

Brian
Brian
~ 4 years ago

Or:

const count$ = Observable
  .merge(click$, res$)
  .mapTo(1)
  .scan();