

SwiftUI builds a View Tree from your code.
Each view (ZStack, VStack, Text, etc.) is a struct that describes UI.
View ≠ actual UI
View = lightweight description of UI
Your UI is represented as a hierarchy:
ZStack
├── BackgroundView
└── VStack
├── CityTextView
├── MainWeatherView
├── HStack (forecast)
└── Button
Each node in this tree is a struct.
When state changes:
SwiftUI does NOT mutate existing views
Instead:
1. Recreate entire view tree (structs)
2. Compare with previous tree (diffing)
3. Update only what changed