Hi there! Is it okay to have one `GeneralViewModel...
# android-architecture
d
Hi there! Is it okay to have one
GeneralViewModel
, that contains another one (or two no matter)
Specific1ViewModel
? Setting as field we can provide the
Specific1ViewModel
to
GeneralViewModel
r
No. Just have individual Viewmodels
d
The S in SOLID is your friend here. And if your having trouble understanding where to assign responsibilities then I also suggest learning GRASP. But in short No, do not nest `ViewModel`s in `ViewModel`s.
d
Thanks a lot! I’ll take it into account!