What problem does it solve?
Large or messy SwiftUI view files become hard to maintain because they mix layout, orchestration, side effects, and duplicated state-flow patterns, leading to unstable view trees and inconsistent Observation usage.
Core Features & Use Cases
- Splits big views into dedicated subview types rather than sprawling computed
some View helpers, improving readability and identity stability.
- Enforces a consistent refactor structure and data flow by prioritizing Environment and local state over view models, aligning with MV-over-MVVM guidance.
- Moves actions and side effects out of
body so the view reads like UI while business logic lives in services/models.
- Reduces top-level conditional root swapping to keep a stable view tree and minimize recomputation.
- Guides correct
@Observable / Observation handling using @State at the owner level on iOS 17+, and legacy patterns only when required.
Quick Start
Ask the AI to refactor your SwiftUI view file using $swiftui-view-refactor and ensure it is split into small dedicated subviews with stable view ordering, MV-first data flow, and no behavior changes.