Create your own Android ViewModel from scratch
You have used ViewModel many times, but do you truly know what purpose it serves, how it is created and how it survives rotation?
In day-to-day Android work, we usually create ViewModels in different ways:
Directly with ViewModelProvider:
val vm = ...
khushpanchal.hashnode.dev7 min read