Closed thekarthiksankar closed 5 years ago
Probably I'm violating a lot of rules but I did this sample before arch components or some guideline exists so I started to create the new implementation -> https://github.com/erikjhordan-rey/People-MVVM-Jetpack!
You're violating the guidelines of the ViewModel!
Since, ViewModel objects are designed to outlive specific instantiations of views or LifecycleOwners. This design also means you can write tests to cover a ViewModel more easily as it doesn't know about view and Lifecycle objects.
Reference : https://developer.android.com/topic/libraries/architecture/viewmodel#implement