iOS Swift - State Management in SwiftUI
Consider this SwiftUI code snippet:
struct ContentView: View {
@State private var count = 0
var body: some View {
VStack {
Text("Count: \(count)")
Button("Add") {
count += 1
}
}
}
}
What happens when the "Add" button is tapped?