@State
Last updated
What is @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.
Free resources to learn @State
- Official docs@State
- Official docsManaging user interface state
- ArticleWhat is the @State property wrapper?
- VideoSwiftUI - @State Property Wrapper Explained
More in stage 29: User Interaction
@State: common questions
Can I learn @State in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain @State in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this @State tutorial for beginners?
It is lesson 95 of 156 in the free Swift & Swift UI roadmap, in stage 29, User Interaction. If you are new to Swift & Swift UI, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.