MΓ³dulo 05 Β· State & Data Flow β LecciΓ³n 2 de 4 Β· ~14 min
Bindings: Two-Way Connections
Reading is easy β writing takes a Binding
Text("30 min walk") only reads state. A text field is different: it must read the current value and write back every character the user types. For that, SwiftUI has the Binding β a two-way connection to a value that lives somewhere else. Through a binding you can read the value and write it.
Every @State property comes with a free binding, spelled with a $ prefix. If email is the String, then $email is the Binding<String> β same value, plus write access.