mirror of
https://github.com/Dimillian/Skills.git
synced 2026-03-25 08:55:54 +00:00
Enhance SKILL.md with fallback guidance for iOS 16 and earlier. Added recommendation to use ObservableObject with appropriate ownership attributes when the Observation API is unavailable.
This commit is contained in:
parent
970b318b90
commit
ce79ef24da
2 changed files with 1 additions and 0 deletions
BIN
.DS_Store
vendored
Normal file
BIN
.DS_Store
vendored
Normal file
Binary file not shown.
|
|
@ -28,6 +28,7 @@ Choose a track based on your goal:
|
|||
## General rules to follow
|
||||
|
||||
- Use modern SwiftUI state (`@State`, `@Binding`, `@Observable`, `@Environment`) and avoid unnecessary view models.
|
||||
- If the deployment target includes iOS 16 or earlier and cannot use the Observation API introduced in iOS 17, fall back to `ObservableObject` with `@StateObject` for root ownership, `@ObservedObject` for injected observation, and `@EnvironmentObject` only for truly shared app-level state.
|
||||
- Prefer composition; keep views small and focused.
|
||||
- Use async/await with `.task` and explicit loading/error states.
|
||||
- Maintain existing legacy patterns only when editing legacy files.
|
||||
|
|
|
|||
Loading…
Reference in a new issue