Answer the question
In order to leave comments, you need to log in
Should the Adapter be in the ViewModel?
realized that the Adapter should not have any references to parts of the architecture at all: Presenter, ViewModel, Activity, Fragment, Router, etc. If you need an event handler, then you need to pass a callback.
Let's say the architecture is MVVM, and if you want to redirect to another screen by clicking on the adapter element, then we must create a callback in the ViewModel (inside it there is a Router object) and pass it to the adapter. Should the Adapter be in the ViewModel?
And is it correct to find Router inside it?
How do you organize your architecture using MVVM?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question