I have a simple View called TextView, I could make this View working without explicitly using some View like this code:
struct TextView: View {
var body = Text("Hello, world!")
}
now I like to control the String also like this code:
struct TextView: View {
let stringOfText: String
init(stringOfText: String) {
self.stringOfText = stringOfText
}
var body = Text(stringOfText)
}
with second code I get this Error:
How could I possibly solve this issue without using Binding or State wrappers?

bodyis no longer a computed property, thus, you can't initialise it with other properties outside init.