Easiest solution for several things I'm doing to to implement Views as classes rather than structs. Don't see anything that prevents it and it mostly works, except for bindings. Example:
final class ContentView : View {
@State var test = false
var body: some View {
let a=test
return Text("Hello World")
}
}Which yields:
Thread 1: Fatal error: Accessing State<Bool> outside View.body
..on line 6.
Any thoughts?