can I get some better understanding on what viewModelFactory does please. ty
๐ 1
๐ถ 1
v
Viktor Petrovski
09/19/2021, 8:13 PM
ViewModelFactory it is a factory class that creates ViewModel objects and configure them so they can survive configuration changes. If you create your object like any other regular the ViewModel wonโt be aware of the activity lifecycle, does that makes things a bit more clear?
Vmfactory males More isolated the instantiation of viewmodels, with things such as passing parameters and enhancing the Ui testing of the viewmodels ๐