I'm experiencing an issue while using navigation-c...
# compose
h
I'm experiencing an issue while using navigation-compose. I have a very simple setup.
HomePage
composable receives a
HomeViewModel
and a
HomeState
object (caller passes
state.value
) as its arguments.
HomePage
also hosts a NavHost which includes 2 different routes(
SettingsPage
,
ProfilePage
) When I pass a field from HomeState like
homeState.username
to one of the composables defined in NavHost, it does not work. State changes do not reflect on children pages of
HomePage
. However, carrying
homeViewModel
and
homeState
directly into
HomePage
composable, fixes this issue.
a
Can you post this code?
h
I can share the project with direct link to where this is happening but I can also try to build a minimal example which reproduces the said issue. I'm reluctant to share the original project because it might be difficult to navigate through.
a
Ok. I suspect something like a stale lambda capture, but I'd like to see if there's something about the navigation-compose API shape that might lead one to it.
h
What do you mean by stale lambda? It kinda reminded me of another bug that I experienced but felt like I might have been doing something wrong.
Should I file a bug for this?
i
Yes, definitely file an issue against Compose
👍 1