Denis01/10/2021, 7:55 AM
always retrieve the same ViewModel object in different composables but in the same activity?
val vm: MyViewModel = viewModel()
Halil Ozercan01/10/2021, 8:35 AM
Denis01/10/2021, 1:21 PM
Navigation Compose also takes advantage of this behaviour to make sure that viewmodels are tied to navigation destinations, rather than activity or fragments.Ah, that's what tricked me! Thanks a lot, Halil!