If I have multiple tabs and I'm using navigation-c...
# compose-android
c
If I have multiple tabs and I'm using navigation-compose... is there a way to keep each tabs composables "in memory". i.e. I dont want to reload when I move back to that tab. I have some views that are costly in certain tabs and I'd love to keep them around so that when you switch from Tab A to tab B and back to A, that A is still there. Our iOS team is doing this and our PM wants us to follow suit.
s
Short answer is probably no. Long answer is perhaps try your luck with movableContentOf and render it globally but hidden somehow when the wrong destination is showing or smth like that? But honestly to me it sounds like that would be more expensive than just rendering it when you actually need it instead. If you're doing this for perf reasons beside just vibes and "iOS does it" you better profile it and see if this is worth doing at all.
c
Reloading certain things like webview and mapview on tab switch is indeed a subpar ux and it feels much better on iOS.
l
You can keep the WebView somewhere too
Use the applicationContext to instantiate