Answer the question
In order to leave comments, you need to log in
Is unsubscribe() needed after takeUntil().subscribe()?
Do I need to save subscription for later "unsubscribe" in ngOnDestroy (see code below)? Or will all cleanup work be done automatically after the predicate in takeUntil is executed?
public ngOnInit() {
this.actions$
.ofType(SIGNUP_FAILURE)
.takeUntil(this.destroyed$)
.do((action: Action) => {
...
})
.subscribe();
}
public ngOnDestroy() {
this.destroyed$.next(true);
this.destroyed$.complete();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question