Just a question: what is benefit against bare Subscription?
stasberkov opened this issue · comments
Stanislav Berkov commented
Without SubSink you can do
subscription = new Subscription();
...
this.subscription.add(subs1$.subscribe(...));
this.subscription.add(subs2$.subscribe(...));
...
this.subscription.unsubscribe();
Can SubSink do it better?
Angel A. Núñez commented
@stasberkov Good question hahaha!!
Huehuehuehue commented
this.subscription.sink is a lot more stylish you have to admit that!
Stefan Karlsson commented
We use a base class for all our components.
The base class have a protected ngUnsubscribe$ subject that is getting unsubscribed onDestroy.
When we have this we can use the RXJS pipe takaUntil(this.ngUnscubscribe$)
Kevin Schuchard commented