While I did compile the detailed answer on Stack Overflow that you reference and I have used that pattern in several large apps I’ve worked on I wouldn’t recommend it as the default way of handling subscriptions.

I think the need to use `takeUntil()` can sometimes represent a component that is trying to do too much internal state management and presentation.

Using an `async` pipe on the Input of a child presentational component might be a better first option, only falling back to `takeUntil()` when you have to manage observables and presentation in the same component.

Web developer passionate about my craft and helping others grow in theirs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store