Halil Ozercan
01/07/2021, 2:57 PMHomePage
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.Adam Powell
01/07/2021, 3:16 PMHalil Ozercan
01/07/2021, 4:35 PMAdam Powell
01/07/2021, 4:39 PMHalil Ozercan
01/07/2021, 4:40 PMIan Lake
01/09/2021, 3:28 PM