[WIP] WorkflowSwiftUI without ObservedObject
Experiment:
- No
SwiftUIScreenprotocol. SwiftUI View conforms directly toScreen - No
ObservableValue. SwiftUI View has multiple, plain, value-typed properties instead of a single@ObservedObjectmodel - Each Workflow re-render sets
UIHostingController.rootView
This approach previously resulted in animation issues documented in Binding SwiftUI Views to Workflow Renderings and 2020's WorkflowView, but I saw none in the SwiftUITestbed app under Xcode 14 and iOS 16.
This approach might lead to more view body evaluations, but after my performance noodling last month, I think those evaluations are cheap as long as they don't trigger additional work in the Core Animation commit phase.
This approach previously resulted in animation issues documented in Binding SwiftUI Views to Workflow Renderings - Google Docs and 2020's WorkflowView, but I saw none in the SwiftUITestbed app under Xcode 14 and iOS 16.
Update: @mjohnson12 tested under iOS 15 and found the same broken animation for Toggle that we reported in that design doc.
https://github.com/square/workflow-swift/assets/106167956/0efbee20-7191-4e61-84ef-4741436f4ed0