1.

What Are The Responsibilities Of Viewmodel?

Answer»

ViewModel is the main point of MVVM application. The primary responsibility of ViewModel is to provide data to the view, so that view can put that data on the screen.

  • It also allows the user to interact with data and change the data.
  • The other KEY responsibility of ViewModel is to encapsulate the INTERACTION logic for a view, but that does not mean all of the logic of the application should go into ViewModel.
  • It should be able to handle the appropriate sequencing of CALLS to make the right thing HAPPEN based on user or any CHANGES on the view.
  • ViewModel should also manage any navigation logic like deciding when it is time to navigate to a different view.

ViewModel is the main point of MVVM application. The primary responsibility of ViewModel is to provide data to the view, so that view can put that data on the screen.



Discussion

No Comment Found