Modern SwiftUI patterns for building declarative, performant user interfaces on Apple platforms. Covers the Observation framework, view composition, type-safe navigation, and performance optimization.
| @State | View-local value types (toggles, form fields, sheet presentation) | | @Binding | Two-way reference to parent's @State | | @Observable class + @State | Owned model with multiple properties | | @Observable class (no wrapper) | Read-only reference passed from parent | | @Bindable | Two-way binding to an @Observable property |
Use @Observable (not ObservableObject) — it tracks property-level changes so SwiftUI only re-renders views that read the changed property:
SwiftUI-Architekturmuster, Zustandsverwaltung mit @Observable, Ansichtszusammensetzung, Navigation, Leistungsoptimierung und moderne Best Practices für die iOS/macOS-Benutzeroberfläche. Quelle: affaan-m/everything-claude-code.