In this article, we will explore some shortcomings of typical mobile app architectures and how a hierarchical approach to state management could enhance them.
Android ViewModels have been the first area of contact with the concept of state management for many of us, especially those who started with Android. Over time, there have been many different iterations and acronyms like MVC (Model View Controller), MVP (Model View Presenter), MVVM (Model View ViewModel), and MVI (Model View Intent). Some are easier to wrap your head around than others, but fundamentally, they all work to solve the same problem: Separating UI code from presentation logic.