Hi,
the documentation for @State says:
the documentation for @State says:
Therefore I am wondering of this is an incorrect (as aValue is set/accessed outside of a "view's body") usage of @State which, while it works now, might break in the future:You should only access a state property from inside the view’s body, or from methods called by it.
Code Block swift @main struct SwiftUIArrayUpdateTestApp: App { @State private var aValue = 5 var body: some Scene { WindowGroup { ContentView(value: $aValue) } } }