How ViewModel survive in configuration changed
In https://developer.android.com/topic/libraries/architecture/viewmodel, the first line mentioned that
The ViewModel class is designed to store and manage UI-related data in a lifecycle conscious way. The ViewModel class allows data to survive configuration changes such as screen rotations.
Let find out how it work underhood