RORK LABJP
ENGINE — Rork Max is powered by Claude Code and Claude Opus 4.6, generating native Swift apps directlyCORE ML — Rork Max reaches on-device Core ML inference alongside HealthKit, HomeKit, NFC, and App ClipsSEED — Rork raised a $15M seed led by Left Lane Capital in April 2026, joined by Peak XV and a16z SpeedrunM&A — Rork acquired the app builder Paperline and says it will stay acquisitive to bring in engineering talentMARKET — Gartner expects 75% of new applications to be built with low-code or no-code tools by the end of 2026GROWTH — The no-code AI platform market is projected to grow from $4.9B in 2024 to $24.8B by 2029ENGINE — Rork Max is powered by Claude Code and Claude Opus 4.6, generating native Swift apps directlyCORE ML — Rork Max reaches on-device Core ML inference alongside HealthKit, HomeKit, NFC, and App ClipsSEED — Rork raised a $15M seed led by Left Lane Capital in April 2026, joined by Peak XV and a16z SpeedrunM&A — Rork acquired the app builder Paperline and says it will stay acquisitive to bring in engineering talentMARKET — Gartner expects 75% of new applications to be built with low-code or no-code tools by the end of 2026GROWTH — The no-code AI platform market is projected to grow from $4.9B in 2024 to $24.8B by 2029
Articles/Dev Tools
Dev Tools/2026-07-06Advanced

Migrating Rork Max SwiftUI to @Observable: Narrowing the Re-renders ObservableObject Was Spreading

Rork Max tends to generate SwiftUI apps built on ObservableObject and @Published, where a single state change re-evaluates every subscribing view. Moving to the Observation framework's @Observable narrows invalidation to the property level. Here is the migration path, plus the view-body execution counts I measured in Instruments before and after.

Rork Max219SwiftUI62ObservationPerformance23iOS107Refactoring4

Premium Article

This article started with a faint hitch. I was scrubbing a SwiftUI list screen generated by Rork Max on a real device, and every time I lifted my finger at the end of a scroll, there was a half-beat of lag. Not a dropped frame — just a small delay I could feel but not name.

Attaching the Instruments SwiftUI template made it obvious. Tapping a single cell to toggle its favorite state re-evaluated the body of every card on screen at once. The cause was the shape of the ViewModel Rork Max had produced: the familiar pattern of an ObservableObject with a stack of @Published properties.

This article walks through moving that ViewModel to the Observation framework's @Observable, so invalidation narrows down to individual properties. I migrated a real project as an indie developer, and I want to leave a working log of what swaps cleanly and what breaks quietly.

Why ObservableObject widens re-renders

The mechanism behind ObservableObject is simple. When any @Published property changes, the object fires its objectWillChange publisher exactly once. A view that subscribes to that object through @ObservedObject or @StateObject cannot tell which property changed. It only receives the fact that "something changed," and it invalidates its own body.

So typing one character into a list filter marks every card sharing that ViewModel for re-evaluation. SwiftUI still diffs the result and minimizes the actual draw, but the body closures do run. If those closures build formatters or do heavy layout work, the cost stacks up once per invalidation.

Code generation like Rork Max tends to centralize state into a single ViewModel. Centralization reads well, but it amplifies the exact weakness of ObservableObject: the coarse granularity of objectWillChange.

What @Observable actually changes is tracking granularity

The Observation framework's @Observable macro changes that granularity at the root. When a view's body runs, only the properties it actually reads are recorded as that view's dependencies. If a card reads only wallpaper.isFavorite, it re-evaluates only when isFavorite changes. Change the filter string, and cards that never read that string stay untouched.

In other words, ObservableObject invalidates per object, while @Observable invalidates per property read. That difference matters precisely in screens like a list, where many views share one object.

Observation requires iOS 17 or later. Most apps Rork Max generates target recent iOS, so the prerequisite is usually met — just confirm your deployment target before you start.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Why ObservableObject widens re-renders and how @Observable narrows them to the property level, shown as before/after code
View body execution counts measured in the Instruments SwiftUI template before and after migration (from ~3.6x baseline down to ~1.0x on a scrolling list)
The five places that break quietly during migration — @Bindable, optional @Environment, didSet — and how to route around each
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Dev Tools2026-07-09
Getting Rork Max's Swift Through Swift 6's Strict Concurrency Checking
A field record of taking a Rork Max-generated SwiftUI app through Swift 6 complete concurrency checking: 217 warnings cleared target by target, where @MainActor actually belongs, and measured before/after numbers.
Dev Tools2026-06-30
Building StandBy-Optimized Widgets in Rork Max
A hands-on walkthrough for tuning WidgetKit widgets for StandBy mode, the landscape charging display in iOS 17+. Covers always-on dimming, night mode, and container backgrounds, including which parts of Rork Max's generated code you still have to finish by hand.
Dev Tools2026-06-24
Fixing Stutter When a Rork Max SwiftUI Image Grid Scrolls
Measure why a Rork Max SwiftUI image grid stutters while scrolling, then fix it with ImageIO downsampling, off-main-thread decoding, and stable cells to cut real-device hitches.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →