Overview
ViewModel, literally, it must be related to the view (View) and the data (Model). Just like its literal meaning, it is responsible for preparing and managing data classes related to UI
Overview
ViewModel, literally, it must be related to the view (View) and the data (Model). Just like its literal meaning, it is responsible for preparing and managing data classes related to UI
Original author: Jose Alcérreca
Original address: ViewModels and LiveData: Patterns + AntiPatterns
Translator: Bingxin said
Ideally, the ViewModel should know nothing about the An