navigator.currentEntry.collectAsStateWithLifecycle always returns null on iOS
FunkyMuse opened this issue · comments
val currentEntry by navigator.currentEntry.collectAsStateWithLifecycle(null)
if it's replaced with
val currentEntry by navigator.currentEntry.collectAsState(null)
then it works, probably the LifecycleOwner
doesn't work properly on iOS or it's not yet implemented?
I ran this sample btw https://github.com/Lavmee/precompose-navigation-typesafe/tree/main/sample
Seems like the initial state of lifecycle in iOS is Initialized, not in Active state, I'm working on a fix now.
Seems like a quick fix, thanks.