swiftui-patterns

Installation
Summary

Modern SwiftUI patterns for declarative, performant UIs with @Observable state management and type-safe navigation.

  • Covers property wrapper selection (@State, @Observable, @Binding, @Environment), view model architecture, and environment injection for dependency management
  • Provides view composition strategies, subview extraction, and ViewModifier patterns to minimize re-renders and optimize rendering performance
  • Includes type-safe NavigationStack routing with NavigationPath and Destination enums for programmatic navigation
  • Details performance optimization techniques: lazy containers for large collections, stable identifiers, avoiding expensive work in body, and Equatable conformance for complex views
  • Lists anti-patterns to avoid, including deprecated ObservableObject/@StateObject in favor of @Observable, and improper async handling
SKILL.md

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 |

Related skills
Installs
3.4K
GitHub Stars
179.7K
First Seen
Feb 24, 2026