I don’t think you get it. I love SwiftUI. It’s a great tool that’s very relevant to modern approaches and I’m sure I’ll love using it… in 2021.
I love declarative approaches, I’ve used Flutter, and I’m even using a declarative toolset I wrote called RxSwiftWidgets, which is basically declarative over UIKit using RxSwift bindings.
import RxSwiftWidgetsstruct MainMenuWidget: WidgetView {func widget(_ context: WidgetContext) -> Widget { ZStackWidget([ ImageWidget(named: "vector1")
.contentMode(.scaleAspectFill)
.safeArea(false), VStackWidget([
ContainerWidget(
HStackWidget([
ImageWidget(named: "Logo-DK")
.height(100)
.width(100)
.contentMode(.scaleAspectFit),
LabelWidget("RxSwiftWidgets")
.font(.title2)
.color(.white)
])
.position(.centerHorizontally)
), MainMenuItemWidget(text: "Settings") { context in
context.navigator?.push(widget: SettingsWidget())
},...
The problem is that SwiftUI is only available for iOS and up, which means if you work on a major commercial app that needs to be backwards compatible down to iOS 12 or 11, or even 10 or 9, then it will be years before you can even use SwiftUI in your project.
e.g. The UIStackView problem.