Post

Replies

Boosts

Views

Activity

Comment on Stop using MVVM for SwiftUI
Just follow SwiftUI data-driven approach and everything will works. If you see my projects maybe you call VMs to my functional / state objects (store, context, …), the concept of MVVM changed in last years for non-Windows platforms. At the end I just focus in model objects with data, logic and other things and following the SwiftUI concepts.. no middle layer. My models includes all kind of non-UI objects (entities, stores, managers, …), MVVM models is just entities and logic move to ViewModel.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’23
Comment on Stop using MVVM for SwiftUI
There’s nothing wrong with MVVM. SwiftUI is modern, declarative and data-drive nature, also automatically do many VM / Controller tasks. MVVM is old, imperative + binding and event-driven. I’m just following the SwiftUI nature. You call Book (Model) and BookVM (ViewModel). I call Book and BookStore, both model objects. At the end is the same but with different names and layers.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’23