WhoBuilt

Lessons from Shopify's Migration to React Native with Mustafa Ali

Jan 14, 2025· 42 min· 2.1K views·Watch on YouTube

Speakers

Mustafa Ali, director of engineering at Shopify, discusses the company’s React Native migration with host Mike on Callstack’s React Universe On Air podcast.

Why Shopify chose React Native

Shopify wanted to stop building the same features separately for iOS and Android, improve collaboration across web and mobile teams, and reduce feature parity work. React Native fit the company’s existing JavaScript and TypeScript skills and infrastructure.

Keep native expertise in the picture

Engineers had mixed reactions, so Shopify encouraged them to try React Native before forming an opinion. Ali says native depth remains essential for high-quality apps: use React Native where it fits and native code for work such as device capabilities and performance-sensitive features.

Migrate in stages and tackle hard problems early

Shopify began with prototypes, then used the Shop app and a rebuilt point-of-sale app to learn at scale. For the point-of-sale app, the team tackled the main card screen’s performance early, tested internally, and gradually expanded access. The main Shopify app migration took a little over two years, compared with an initial estimate of three, while the team continued shipping features.

Delete old code and invest in the framework

Shopify introduced React Native into the existing app, then migrated its most-used screens before less-used screens and app foundations. Ali made deleting the old native code part of completing each migration; build times improved as code was removed, and the team deleted 1.8 million lines overall. Prototyping helped de-risk list performance, and Shopify contributed tools such as FlashList back to the community.

Share selectively and protect performance

About 86% of the main app’s codebase is unified across platforms, while Shopify keeps native implementations for features such as widgets, Apple Watch, scanning, and on-device AI. The Inbox app shares about 75% of its business logic between mobile and web using React Native Web. Ali advises teams to prioritize performance early and keep native and React Native developers working together.

Takeaways

  • Choose a cross-platform framework based on the problems it solves and the skills your teams already have.
  • Keep native specialists involved for integrations, device features, upgrades, and performance-critical work.
  • Test the hardest, highest-risk screens early, then expand through staged rollouts.
  • Count a migration as complete only after removing the replaced code and migration scaffolding.
  • Set performance goals early and keep measuring them to catch regressions.

Mentioned in this talk

Search inside this talk

What was claimed 18

Show all 18 facts

Related talks