I am trying to learn SwiftUI by myself. I've been stuck on this for a few hours now. Is the sytax wrong?
- I have an integer called x = 1
- want to make a Button that adds 10 to x
This is what i have now, but its giving me error: '()' is not convertible to '() -> Void'
var x: Int = 1
Button(action: self.x = x + 10) {
Text("+10")
}