Interesting library ! I like the .pipe(untilDestroyed(this)) pattern. The annotation is also quite clean as well. The only disadvantage of an annotation is that you don't directly see the link between the unsubscribe and the actual code. The pipe forces you to manually unsubscribe, IMO makes the code easier to maintain, and is syntactically nicer than pushing into the array. Good one :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is an important pattern. For me this library solved this pretty elegantly: github.com/ngneat/until-destroy
Interesting library ! I like the
.pipe(untilDestroyed(this))
pattern. The annotation is also quite clean as well. The only disadvantage of an annotation is that you don't directly see the link between the unsubscribe and the actual code. Thepipe
forces you to manually unsubscribe, IMO makes the code easier to maintain, and is syntactically nicer than pushing into the array. Good one :)