You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is interesting, but why exactly is it "better" or performance related? It doesn't really save any code, nor changes what actually happens. In fact it creates more runtime overhead by creating more objects.
Another alternative is a OnceSubject which has a single method for next + complete, that would also save a bit of code when used.
current way
better way
extends subject
ref https://stackblitz.com/edit/angular-auto-unsubscribe-service?file=src%2Fapp%2Fhello.component.ts
extends Obseverable
https://twitter.com/Waterplea/status/1271037735332204544
The text was updated successfully, but these errors were encountered: