RORK LABJP
FUNDING — Rork closed a $15M seed round led by Left Lane Capital, with Peak XV, True Ventures, Goodwater, and a16z SpeedrunSCALE — In under a year, Rork became one of the world's largest AI mobile app building platforms by web trafficMAX — Rork Max generates native Swift apps, powered by Claude Code and Claude Opus 4.6NATIVE — Rork Max reaches Xcode-class territory: AR/LiDAR, Metal 3D, widgets, Live Activities, HealthKit, and Core MLSTACK — Standard Rork builds iOS and Android together in React Native (Expo), so non-engineers can ship real appsPRICE — Plans start free, paid tiers from $25/month, and Rork Max at $200/monthFUNDING — Rork closed a $15M seed round led by Left Lane Capital, with Peak XV, True Ventures, Goodwater, and a16z SpeedrunSCALE — In under a year, Rork became one of the world's largest AI mobile app building platforms by web trafficMAX — Rork Max generates native Swift apps, powered by Claude Code and Claude Opus 4.6NATIVE — Rork Max reaches Xcode-class territory: AR/LiDAR, Metal 3D, widgets, Live Activities, HealthKit, and Core MLSTACK — Standard Rork builds iOS and Android together in React Native (Expo), so non-engineers can ship real appsPRICE — Plans start free, paid tiers from $25/month, and Rork Max at $200/month
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 Max216SwiftUI61ObservationPerformance22iOS105Refactoring3

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-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.
Dev Tools2026-06-24
Quietly Dialing Back Heavy Work When the Device Gets Hot or Enters Low Power Mode
How to watch ProcessInfo's thermalState and Low Power Mode and degrade heavy work in stages when the device is hot or the battery is low, with working Swift code.
📚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 →