Aug 29, 2021
When we use @InstallIn(ViewModelComponent::class) what happens here is that the lifecycle of the object injected will be bound to the viewModel in which it is injected. And if we use @ViewModelScoped annotation for the object that means, single instance will be created for that injected object throughout the lifecycle of that ViewModel.