When developing with Cocoa/UIKit, the most common used architecture is MVC.
What is the architecture when using SwiftUI? Someone says it is MVVM. Someone says it is MV, MVC without C. I would like say it would be M-VC, Model with View and Controller.
We want every element to be simple. For MV architecture, the View is too heavy for me. For M-VC, we want the View as simple as possible. The extra parts we think it to be Controller.
Split View into small Views
For a SwiftUI View, when one of the
@State properties changed, all
@State properties in the same view will be updated. If this is overhead, you can split those
@State properties to another view, that will reduce CPU usage and speed up your app.