What's the point of separating the Model from the View Model? (MVVM)

前端 未结 4 1592
情歌与酒
情歌与酒 2021-01-20 03:03

I don\'t think I understand the MVVM pattern properly because having a Model and ViewModel class seems redundant to me.

My understanding of the Model is to basicall

4条回答
  •  醉梦人生
    2021-01-20 03:16

    The models represent your data. The viewmodel only uses those models to drive your UI. Models should represent entities... things. Viewmodels use those things, that's the difference.

提交回复
热议问题