swiftui-observable

Community

Fine-grained SwiftUI state with @Observable

AuthorAutisticAF
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Helps SwiftUI developers migrate from ObservableObject patterns and design class-based state models that provide fine-grained view updates, reducing unnecessary redraws and boilerplate.

Core Features & Use Cases

  • Migration steps and practical patterns to replace ObservableObject, @Published, @StateObject, and @ObservedObject with @Observable and @State.
  • Guidance for two-way bindings with @Bindable, excluding properties with @ObservationIgnored, injecting models via Environment, and using @MainActor for UI safety.
  • Interoperability notes for SwiftData @Model, bridging legacy code, and advice for minimizing redraw scope in complex views.

Quick Start

Migrate your ObservableObject-based view model to @Observable, remove @Published annotations, replace @StateObject with @State, and update views to use @Bindable or plain properties for bindings.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: swiftui-observable
Download link: https://github.com/AutisticAF/claude-code-apple-dev-plugin/archive/main.zip#swiftui-observable

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.