I have the following code in SwiftUI preview macro.
#Preview {
@StateObject static var store = Store()
...
}
And it fails with the error:
Static properties may only be declared on a type
Is there a solution for this?
I have the following code in SwiftUI preview macro.
#Preview {
@StateObject static var store = Store()
...
}
And it fails with the error:
Static properties may only be declared on a type
Is there a solution for this?