Just a question: what is benefit against bare Subscription?
stasberkov opened this issue · 4 comments
stasberkov 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?
mailok commented
@stasberkov Good question hahaha!!
TheSegfault 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$)