Building an App Clip with React Native
Shopify built an iOS App Clip for the Shop app in React Native under the 10MB size cap, aimed at reducing drop-off between the checkout "Thank you" page and order tracking. A naive Hello World App Clip was 28MB because autolinking pulled in every native dependency. Explicitly listing a minimal set of pods in the Podfile cut it to 4.3MB, and a scrappy feature-complete prototype came to 6.5MB. Sharing order-view components failed because they transitively pulled in heavy native dependencies, so the team duplicated UI code, reused only stable shared primitives, and let size constraints drive design decisions. A CI script compares Podfile dependencies against the App Clip's import graph to catch new native dependencies.
Related posts
- Five years of React Native at Shopify
Shopify Engineering easyNoviceAfter five years, Shopify has migrated all its mobile apps to React Native, with each team choosing its own migration timing, and reports sub-500ms P75 screen loads, over 99.9% crash-free sessions, and an end to iOS/Android feature-parity work. Hot reloading and TypeScript let engineers move between web and mobile, but native developers and native code remain essential for hardware features, widgets, watch apps and long-running background sync such as Point of Sale offline data. The downsides are flaky debugging, labor-intensive framework upgrades (handled by a rotating group) and heavier reliance on third-party libraries, mitigated with Dependabot and code scanning. Shopify is now extracting shared libraries for identity, monitoring and performance measurement after initially trading consistency for migration speed.
- Migrating our Largest Mobile App to React Native
Shopify Engineering mediumAdeptShopify is moving its largest native app, Shopify Mobile (300 screens per platform), to React Native through "Iterative Porting" rather than a rewrite. All new features are built in RN while existing screens are ported in parallel. Ports are prioritized with RICE scoring, shipped behind feature flags and monitored for two weeks before the native code is deleted. The team started with the four root screens, which took about four months and needed infrastructure along the way: "Native Routes" so RN can navigate to native screens, deeplinks that open as modals on iOS to avoid mixed RN/native navigation stacks, and safe-area handling inside cells. The porting also exposed and removed business-logic differences between the iOS and Android versions.
- Reusing Code with React Native Packages at Shopify
Shopify Engineering mediumAdeptShopify consolidated shared React Native code (login, foundational blocks) across apps like Shop, Inbox and Point of Sale into a monorepo of npm packages rather than many separate repos, mainly to cut maintenance costs. The setup combines TypeScript project references, Yarn Workspaces, Lerna for independent versioning and publishing, root-level Babel/Jest/ESLint configs, and a fixture app with custom Metro, Babel and Podfile config for hot reloading local packages. A PlopJS template generates new packages with auto-generated CI pipelines that rebuild only changed packages and their dependents, and a Gatsby site auto-generates docs from package.json metadata. Since June 2020 the repo has produced 17 packages, 10 contributed by product teams. The team is now splitting into a few thematic monorepos and plans to automate releases with conventional commits.
- How we rebuilt the Shopify app in 12 weeks
Shopify Engineering mediumAdeptThirty engineers rebuilt the 300+ screen Shopify mobile app from React Native to native Swift and Kotlin in 12 weeks, with agents writing most of the code. The key work was building a system around the agents: a shared Reflex architecture for iOS and Android that lets ViewModels run headless from a CLI in milliseconds, CI checks that fail on cross-platform drift, and Helix verifying small checkpoints against the legacy app, which served as the spec instead of written documents. As code generation got faster, the bottlenecks moved to laptops, code review, merging and coordination. Shopify answered with remote dev environments, agent-first adversarial review on small dual-platform PRs, a daily loop that turns review comments into rules, agent-driven merge queues, and pod ownership by product area. Launch time dropped about 50% on Android and 14% on iOS, and the Android binary shrank by 40%.
- Migrating Shop app from React Native to native
Shopify Engineering mediumAdeptShopify rebuilt the Shop app from React Native into native Swift/SwiftUI and Kotlin/Jetpack Compose in 12 weeks, with coding agents porting features using the existing React Native app as a reference. Native builds cut cold start by 23% on iOS and 50% on Android, raised session stability from 99.5%+ to 99.95%+, shrank the Android app by 109 MB, reduced Android release build time by about 75%, and reached 120 FPS scrolling on Pixel. The team built a Pi agent extension with subagents for source analysis, planning, implementation and parity review, with plan approval tied to a content hash. They also built Tardis, a tool that exposes live app events, logs and state to agents and compares analytics payloads between the old and new apps. Native expertise, linting, tests and code review were still needed to catch duplication, architectural drift and performance problems in generated code.