DEV Community

Discussion on: Don't follow RxJS Best Practices

Collapse
 
qm3ster profile image
Mihail Malo

Is this actually a good one?

takeWhile(() => this.alive)

Wouldn't this only trigger once the source tries to push a value, so if a value is never pushed the subscription is never garbage collected?
Seems vastly inferior to

destroyed$ = new Subject()