In [[SwiftUI]] [[SwiftUI View Protocol|views]], is fairly common to use [[@State Property Wrapper in SwiftUI|stateful properties]] to store and display data. However, that bifold functionality requires a special syntax, marking the variable with a dollar sign (`
):
```swift
struct ContentView: View {
@State private var name = ""
var body: some View {
Form {
TextField("Enter your name", text: $name) // two way
Text("Hello, \(name)!") // one way, we are only reading
}
}
}
```