Prafull Mishra
1 min readAug 31, 2020

Here I wanted to abstract the architecture details from this concept hence the comment "Show error Toast". But I am assuming that readers know that any decision making step is not part of a view, rather of a Presenter or ViewModel.

Similarly in case of architectures like MVI, a certain state can be dispatched to the View from that if/else block. See where I am getting with this?

So I think its safe to say that this methodology is irrespective of the architecture, with the aim being to reduce the possible states of app, while also making sure we track each of them.

Based on the code's state, whether we have to update UI directly (MVP) or dispatch some kind of state (MVI), that depends on the underlying architecture.

Hope it helps!

Prafull Mishra
Prafull Mishra

No responses yet

Write a response