Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49215

Is BehaviourSubject needed with Ionic3 Lazy Loading?

$
0
0

@barakbd wrote:

My understanding is that BahviourSubject is better than using @Output+EventEmiter, since it is more memory efficient.
You subscribe when the page is loaded, and unsubscribe before page exits (ionViewWillUnload).
However, if Ionic3 Lazy Loading is destroying the page/component that contains the Event Emitter/Event Listener, and removing it from memory (My undersating of Lazy Loading), what difference does it make if I have an event Listener or a subscribed observer?
I am trying to figure out how to test the difference with profile recording in Chrome Devtools…

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49215

Trending Articles



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