Swiftui Correctness

Use when SwiftUI code is written or reviewed and the risk is wrong behaviour, lost state or needless redraws rather than a crash: soft-deprecated modifiers that compile without a warning, NavigationStack destination registration and mixing value links with destination-closure links, sheets and alerts driven by a Boolean plus a separate value, @State ownership and privacy, @Observable models and their main-actor isolation, Binding(get:set:) in a body, @AppStorage inside a model, environment values that hold closures or unstable defaults, ForEach identity from indices or offsets, a varying number of views per row, conditional-modifier helpers and AnyView, work in init or body, task versus onAppear, SwiftData with CloudKit constraints, icon-only buttons, tap gestures used as buttons, Dynamic Type, Reduce Motion, string concatenation that defeats localisation, size classes versus device idiom, and safe-area handling.

techmefr Updated

File contents

techmefr/mentis commit 1cf012d0d7

Frequently asked questions

npx get-skill add techmefr/swiftui-correctness