What problem does it solve?
Modern SwiftUI projects face fragmented state management, brittle navigation, and rendering performance issues as interfaces grow in complexity; this skill consolidates patterns and guidance to create predictable state flows, type-safe routing, and efficient view composition for iOS and macOS apps.
Core Features & Use Cases
- Property wrapper guidance: choose when to use view-local state, bindings, or observable view models to minimize unnecessary view invalidation.
- Observable view models: patterns for designing observable classes that track property-level changes and support async loading tasks.
- Type-safe navigation: migrate imperative routing to NavigationStack and NavigationPath for programmatic, testable navigation flows.
- Performance strategies: leverage lazy containers, stable identifiers, and equatable views to reduce rendering costs in large lists and complex layouts.
- Developer workflow: compose small focused subviews, create reusable view modifiers, and use preview-driven mocks for fast iteration.
Quick Start
Use the swiftui-patterns skill to refactor a list view into an observable view model, inject dependencies via the environment, and migrate navigation to a type-safe NavigationStack.