THE MIGRATION LINE
INCIDENT // SHOPIFY-2020 SHIPPED

After three app experiments showed 95-99% code sharing and a team that felt twice as productive, Shopify decided all new mobile apps would be built in React Native.

SHOPIFY · 2020 · MOBILE / REACT-NATIVE / IOS / ANDROID
System stress over time Nominal
95% Arrive, 99% Compass Code sharing
~2x vs native Arrive team velocity
3 months Compass to app stores
69% Mobile share of BFCM sales
BEFORE

Two stacks, one of them frequently missing

Mobile is where Shopify’s business happens. In Q3 of the prior year, 71% of buyers purchased on mobile. During Black Friday and Cyber Monday — the bellwether days for merchants — purchases on mobile rose another 3%, averaging 69% of sales.

And until this decision, the standard for all mobile development at Shopify was native. There were mobile tooling and foundations teams dedicated to iOS and Android. Those teams were successful, and so were their apps. The problem wasn’t failure.

AFTER

What three experiments actually returned

Over a year, Shopify ran React Native through three separate teams and three apps. Arrive, rewritten in React Native, ended up sharing 95% of its code across iOS and Android; the team felt they were twice as productive than with native development, even on just one platform. The rewrite produced fewer crashes on iOS than the native iOS app it replaced, shipped the Android version merchants had been asking for, and was built by a team of mobile and non-mobile developers together.

Compass — now Shopify Learn — was the from-scratch case. Its team did a deep dive into native, Flutter, and React Native, chose React Native, and had iOS and Android apps live in the stores within three months, sharing roughly 99% of code. Shopify had estimated around 80% code sharing going in. The 95% and 99% they got instead surprised them.

Point of Sale was the hard case, and it was run as a test rather than a rewrite. A six-week experiment revealed that retail merchants expect almost 2x the responsiveness from POS, because they use it from muscle memory while talking to a customer. Testing on low-power Android hardware also let Shopify set a lower CPU threshold than previously imagined — 1.5GHz rather than 2GHz.

BRIDGE

How they actually crossed

There was no big-bang rewrite. The crossing was: prove it on a consumer app that lacked an Android version, prove it again on a greenfield app, and stress it on the app with the strictest performance bar — then change the default only for new work.

THE COST

What they kept in native, and what they didn't promise

The decision comes with an explicit boundary. React Native is not the default when an app must run on older hardware below the 1.5GHz threshold, do extensive processing, hit ultra-high performance, or run many background threads. Low-level libraries, including many open-sourced SDKs, remain purely native, and Shopify can write its own native modules whenever it needs to be close to the metal.

And the existing apps stay where they are. Shopify was direct about it: they will not automatically rewrite old apps in React Native — that is each app team’s independent call. They will keep hiring native engineers, in numbers, because contributing to core React Native and building platform-specific components requires deep native expertise. Because the framework compiles down to real platform views, going all-in on React Native does not let you stop understanding the platforms underneath it.

Shopify’s bet isn’t that React Native replaces native engineering — it’s that one shared stack plus deep native expertise beats two shallow stacks, and the price of admission is keeping the native engineers you were hoping to stop hiring.

Source — read the original

https://shopify.engineering/react-native-future-mobile-shopify

A plain-language, AI-drafted and human-edited retelling of the article published on shopify.engineering, reorganized and explained in our own structure and words, with original analysis in the editor's note above. The facts, numbers, and decisions belong to the original author and are not altered. For the full depth, read the source.

← All systems