
Swiftui Patterns
Covers the modern SwiftUI stack with @Observable instead of the older ObservableObject approach, which matters because property-level change tracking means fewer unnecessary view re-renders. You get patterns for state management (when to use @State vs @Binding vs @Environment), type-safe navigation with NavigationPath and enums, and performance tips like lazy containers and avoiding heavy work in body. The Router pattern and dependency injection examples are clean. Honestly most useful if you're already past the basics and want to structure a real app without fighting SwiftUI's quirks or cargo-culting outdated tutorials that still use @Published everywhere.
- skills.sh installs
- 5.2K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill swiftui-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
SwiftUI Patterns
Modern SwiftUI patterns for building declarative, performant user interfaces on Apple platforms. Covers the Observation framework, view composition, type-safe navigation, and performance optimization.
When to Activate
- Building SwiftUI views and managing state (
@State,@Observable,@Binding) - Designing navigation flows with
NavigationStack - Structuring view models and data flow
- Optimizing rendering performance for lists and complex layouts
- Working with environment values and dependency injection in SwiftUI
State Management
Property Wrapper Selection
Choose the simplest wrapper that fits:
| Wrapper | Use Case |
|---|---|
@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 |
@Environment | Shared dependencies injected via .environment() |
@Observable ViewModel
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- Category
- Mobile Development
More from affaan-m/everything-claude-code
All 256- Investor Materials5.1K
- Laravel Tdd5.1K
- Regex Vs Llm Structured Text5.1K
- Compose Multiplatform Patterns5K
- Continuous Agent Loop5K
- Foundation Models On Device5K
- Investor Outreach5K
- Kotlin Patterns5K
- Rust Patterns5K
- Swift Actor Persistence5K
- Swift Protocol Di Testing5K
- Bun Runtime4.9K
- Nextjs Turbopack4.9K
- Plankton Code Quality4.9K
- Swift Concurrency 6 24.9K
- Visa Doc Translate4.9K
- Ai Regression Testing4.8K
- Architecture Decision Records4.8K
- Blueprint4.8K
- Everything Claude Code Conventions4.8K
- Exa Search4.8K
- Kotlin Testing4.8K
- Customs Trade Compliance4.7K
- Data Scraper Agent4.7K