RxJS: Avoiding takeUntil Leaks
3 min readMay 27, 2018
Using the takeUntil
operator to automatically unsubscribe from an observable is a mechanism that’s explained in Ben Lesh’s Don’t Unsubscribe article.
It’s also the basis of a generally-accepted pattern for unsubscribing upon an Angular component’s destruction.
For the mechanism to be effective, operators have to be applied in a specific sequence. And, recently, I’ve seen code that…