Back to Developer Roadmap

@State

src/data/roadmaps/swift-ui/content/[email protected]

4.0888 B
Original Source

@State

@State is a property wrapper in SwiftUI that allows you to manage the state of a view. It's used to store values that can change over time and trigger updates to the view when they do. When a property is marked with @State, SwiftUI automatically manages the storage and ensures that the view is re-rendered whenever the value changes, reflecting the updated data in the user interface.

Visit the following resources to learn more: