Skip to content

Instantly share code, notes, and snippets.

@dheerajn
Created September 27, 2021 03:01
Show Gist options
  • Save dheerajn/aef9b26940dfd244ada9c9ae47ae3b05 to your computer and use it in GitHub Desktop.
Save dheerajn/aef9b26940dfd244ada9c9ae47ae3b05 to your computer and use it in GitHub Desktop.
struct PrintingChanges: View {
@State var counter = 0
var body: some View {
Self._printChanges()
return Button {
counter += 1
} label: {
Text("Current Value \(counter)")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment