Compose question but android ish specific so I'm g...
# android
c
Compose question but android ish specific so I'm going to ask here first. I have an app with all fragments. I currently check in every fragment if my user is logged out. I follow Ian Lakes video on navigation and everything works really well. I'm moving fully to compose now, no fragments and so now I'm curious how I would do the same check. Overall just curious if someone has docs on how to tackle this use case in pure compose. Basically is there something like this

https://youtu.be/09qjn706ITA

4:48 but for compose?
i
Just do the exact same thing? You can
observeAsState()
on a `SavedStateHandle`'s LiveData
c
Thanks, so this would mean that I have to use AAC VMs?
i
You could have your own storage system that is tied to the unique IDs of each
NavBackStackEntry
, but the only signal on when to clear that key/value would be...a `ViewModel`'s
onCleared()
As Compose offers no permanently destroyed signal itself
c
Hm. This may put a bit of a dent in my single activity, all compose, no AAC VMs plans.
Back to the drawing board I suppose.