**Matteo | Swift, iOS, Best Practices** @MatManferdini [2026-04-24](https://x.com/MatManferdini/status/2047735572718833889)Here is a typical example of a wrong MVVM implementation you often find online for a view that fetches its data from a REST API.While this looks like purely declarative code at first glance, the view transitions between states will be driven by imperative logic.Moreover, in such a simple piece of code, you can get away with violating any software development principle without significant issues.However, those principles exist to prevent problems as code becomes increasingly complex.Read how they help here: https://matteomanferdini.com/swiftui-viewmodel/?utm\_source=x&utm\_medium=social&utm\_campaign=swiftui-viewmodel&utm\_id=content-calendar-2026-04-20…
**Bobby Bobak** @bobek\_balinek [2026-04-25](https://x.com/bobek_balinek/status/2047946620159869255)To me, the structure of the ViewState in that image is the model itself, and should be separate from the view. You don't need MVVM to fix this.
**Bobby Bobak** @bobek\_balinek [2026-04-25](https://x.com/bobek_balinek/status/2047946620159869255)To me, the structure of the ViewState in that image is the model itself, and should be separate from the view. You don't need MVVM to fix this.