DEV Community

Discussion on: RxJS Notification and materialize / dematerialize operators

Collapse
 
boneskull profile image
Christopher Hiller

Thanks. I have a couple questions:

  1. hasValue is true on complete? Completion doesn’t emit a value afaik
  2. Can you not use catchError() to trap errors and continue?

While a relative novice with RxJS myself, I’m still unclear about the use case for notifications short of building debugging tools.

Collapse
 
wojciechmatuszewski profile image
Wojciech Matuszewski

Hi Chris, thanks for reading.

About onComplete: You are completely right! It does not have hasValue as true. That's a mistake on my part, will edit it out.

About catchError(): That operator would work similarly to materialize / dematerialize combo. These operators are pretty 'niche' and I just wanted to write about them so that people know they exist (just like I did not know them).

It's hard for me to come up with some reasonable, day-to-day, use case (except debugging tools, just like you mentioned), but maybe, one day, they will be all someone needs to solve an issue they are currently facing.