Zun
06/12/2021, 4:29 PMinit
function? Context in threadval exploreViewModel: ExploreViewModel = hiltViewModel(it)
My ExploreViewModel needs to load shows by a given genre inside the init. The user can then (on the same screen) select a different genre.val exploreViewModel: ExploreViewModel = hiltViewModel(it)
exploreViewModel.load("Comedy")
Because, if the user navigates as follows:
Home -> ExploreScreen -> ShowScreen
And from ShowScreen back to ExploreScreen with a back press, then the "Comedy" tag will be loaded again due to how composable worksbrandonmcansh
06/12/2021, 4:34 PMZun
06/12/2021, 5:20 PM