Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229110

Should I unsubscribe Observables lists?

$
0
0

@AaronSterling, It seems strange that a Subject could emit after completion. Chalk it up to the imperfections of computer tech??

I certainly don’t have 50 observables on any page, but I do tend to have 2 - 3 observables on init that get items like a user id, an app state boolean or string, etc.

Those I always use take(1) on so don’t need to think twice about them. But with the addition of a couple more Observables, I guess I just prefer reducing my code by a few lines when possible. Or I just like feeling clever.

Though avoiding importing { Subscription }, Typing each subscription, then assigning and unsubscribing does seem to reduce my lines to a decent degree.

I am curious about

that line though.


Viewing all articles
Browse latest Browse all 229110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>