zoha131
11/13/2020, 3:47 PMviewModel
scoped to a composable
using navigation-compose
?Ian Lake
11/13/2020, 4:58 PMviewModel()
inside those composablesnrobi
11/13/2020, 5:36 PMsetContent
, since it has to be tied to a ViewModelStoreOwner
Ian Lake
11/13/2020, 5:43 PMViewModelStoreOwner
for each NavBackStackEntry
as per the docs: https://developer.android.com/guide/navigation/navigation-programmatic#navbackstackentryNavHost
overrides the ambients so that viewModel()
within the composable uses that scoped ownernrobi
11/13/2020, 5:50 PMzoha131
11/13/2020, 6:26 PM