← All posts

Shopify leaves React Native for Swift, Kotlin, and Reflex

Shared UI stopped winning once AI agents can write and verify native logic without an emulator. Migration numbers inside.

Shopify leaves React Native for Swift, Kotlin, and Reflex
Contents

In brief

Shopify dropped React Native for its mobile app and moved to Reflex, built around Swift and Kotlin. Logic is separated from UI so AI agents can edit code and verify behavior without an emulator. In 2020 the company went all-in on shared Android/iOS code to save time and money; it now says agents made native development much cheaper, so the shared UI advantage no longer covers its costs.

What happened

In Reflex, Core holds logic, navigation, and data handling independent of UI and mobile OS APIs: the iOS build runs on macOS, Android on the JVM. A separate Mobile module renders SwiftUI and Jetpack Compose.

Each screen has a ViewModel for state and commands, with all changes through a single update command. Agents call the same ViewModels via CLI and exchange JSON describing screens, states, and actions — no taps, no emulator.

Android and iOS are written separately but tested against shared scenarios; changes do not merge if a test passes on only one platform. 1,700+ tests finish in about four minutes on both. A ~30-engineer team rewrote the main apps (300+ screens) in 12 weeks; most code was agent-generated. Android size: 80.4 → 47.6 MB; median launch: 1.71 → 0.87 s (iOS: 0.70 → 0.60 s).

Why it matters

This is not a “React Native is dead” slogan. It is a cost-equation shift: when an agent cheaply writes and runs native logic, the win from one JS bundle shrinks while bridge cost, platform lag, and native debugging stay.

The key is architecture: testable logic apart from UI. Without that, the agent hits the emulator and screenshots, and native is expensive again.

In practice

  1. Before copying Shopify, weigh team size, test coverage, and how many screens need native UX.
  2. If you stay on RN, still separate domain logic from presentation — useful even without a migration.
  3. Shared scenarios across platforms matter more than “shared UI code” when agents write platform layers.
  4. Treat binary size and cold start as product metrics of a migration, not only architecture aesthetics.
  5. Do not expect 300 screens in 12 weeks without a mature ViewModel CLI and a hard test gate.

Takeaway

Shopify shows when native beats cross-platform again: agents plus isolated logic plus shared scenarios. For other teams that is a reason to re-check RN economics — not to burn the bridges overnight.

Comments

Loading comments…