Five Years of React Native at Shopify
Shopify has transitioned all its apps to React Native, improving productivity and performance. The company plans to restart the React Native Working Group in 2025 to address ecosystem challenges.
Read original articleShopify has successfully utilized React Native (RN) over the past five years, transitioning all its apps to this framework. The decision to adopt RN was driven by the desire to avoid duplicating efforts on iOS and Android, enhance developer flexibility, and deliver more value to users. The transition has led to significant productivity gains, with engineers now able to work across platforms and maintain feature parity more efficiently. Performance has improved, achieving sub-500ms screen loads and over 99.9% crash-free sessions. Key learnings include the importance of native expertise for optimizing app performance and the value of TypeScript for talent portability. While RN has its advantages, such as hot reloading and shared code capabilities, challenges remain, including debugging difficulties and the need for third-party libraries. Shopify emphasizes a balanced approach, integrating both RN and native code where appropriate. The company is committed to contributing to the RN community and plans to restart the React Native Working Group in 2025 to address ecosystem challenges collaboratively. Overall, Shopify's experience indicates that RN has matured significantly, making it a viable option for building high-quality mobile applications.
- Shopify has migrated all its apps to React Native, enhancing productivity and performance.
- The use of TypeScript has facilitated easier transitions for developers between web and mobile platforms.
- Native expertise remains crucial for optimizing app performance and managing updates.
- Challenges include debugging issues and reliance on third-party libraries.
- Shopify plans to continue contributing to the React Native community and restart the React Native Working Group in 2025.
Related
React Native team says "Use Expo"
The React Conf suggests using a React Native framework like Expo for app development, offering essential APIs for navigation, data fetching, and state management. Expo simplifies upgrades and tooling, while custom frameworks are an option. The React Native team endorses Expo as the primary community framework, with support for using React Native without a framework. The guidance is reflected in the updated Getting Started page, and a detailed RFC0759 explains the rationale and potential future recommendations for fostering competition and innovation in the React Native ecosystem.
Migrating Coinbase's 56M Users to React Native: Key Lessons and Takeaways
Coinbase transitioned 56 million users to React Native, addressing performance challenges like re-rendering. Nick Cherry discussed platform-specific optimizations, Farcaster/Warpcast development, React Navigation, Expo benefits, and AI in front-end development. StepChange offers database modernization services.
Migrating Coinbase's 56M Users to React Native: Key Lessons and Takeaways
Coinbase migrated 56 million users to React Native, addressing performance challenges like re-rendering. Nick Cherry discussed platform-specific optimizations, Farcaster/Warpcast development, Expo benefits, and StepChange's expertise in modernizing databases for improved scalability.
New Architecture is here
React Native 0.76 introduces a New Architecture as default, enhancing performance with modern features, synchronous communication, and improved rendering. It has been successfully used in major apps like Facebook and Instagram.
Rewrite it in Rails
The author developed a customs declaration app in Ruby on Rails, faced challenges rewriting it in Rust and SvelteKit, and ultimately returned to Rails for its rapid development benefits and collaboration.
- Many users express disappointment with the app's loading times, questioning the claim of "blazing fast" performance given the observed delays.
- There is a consensus on the importance of native developers in optimizing app performance and managing React Native effectively.
- Some commenters highlight the advantages of using Expo for React Native projects, noting its recent improvements.
- Several users emphasize the need for better user experience (UX) standards, criticizing the acceptance of half-second load times.
- Others point out the challenges of maintaining a large-scale React Native codebase and the potential benefits of alternative frameworks like Hotwire Native.
But as a user of computers and occasional native mobile app developer, hearing "<500ms screen load times" stated as a win is very disappointing. Having your app burn battery for half a second doing absolutely nothing is bad UX. That kind of latency does have a meaningful effect on productivity for a heavy user.
Besides that, having done a serious evaluation of whether to migrate a pair of native apps supported by multi-person engineering teams to RN, I think this is a very level-headed take on how to make such a migration work in practice. If you're going to take this path, this is the way to do it. I just hope that people choose targets closer to 100ms.
"Native devs are crucial
Mobile engineers who specialize in iOS and Android are essential to building great mobile apps. There is no replacing experience and taste that comes from having built many mobile products and deeply understanding conventions and usability. Being able to drop down to the platform layer, write bindings, master build & release, distribution, etc requires native expertise.
They also play a vital role in optimizing app performance across the myriad of device models, ensuring a consistent user experience for all users. Additionally, native expertise is essential for managing React Native version updates, as well as adopting new features, APIs, and tooling changes that accompany new iOS and Android releases. You can't build a good product without these experts.
We invested in training our native mobile developers in React Native through a self-serve course that covered everything they needed to know to ship production-ready code. Additionally, we set up office hours with developers who were already proficient in React Native to provide support through Q&A sessions, pair programming, and code reviews.
We also supplemented our mobile teams with some web developers for their Javascript, Typescript, and React expertise. This ensured we had strong expertise in both native and React Native, and over time, it levelled up the entire team.
Having a good mix of native and web developers is the key to building great mobile apps using React Native in our experience. "
For example, I just recorded myself tapping on a product in the Product list screen and the delay between the pressed state appearing and the first frame of the screen transition animation is more than half a second. The animation itself then takes 300ms which is a generally accepted timeframe for screen animations. But that half second where I'm waiting for the app to respond after I've tapped a given element is painful. UX studies indicate 0.1s as a number where an application no longer feels instantaneous. (https://www.nngroup.com/articles/response-times-3-important-...)
Contrast this against something like the Slack app where the screen is navigating even before the pressed animation has appeared. Or for an app with probably not as much engineering focus, Fastmail, which begins the screen transition within 100ms of the pressed animation state appearance.
The biggest game-changer recently is Expo's Continuous Native Generation[0]. You can configure all of your native modules and ios/android files with a simple config file (which has its limits, whereby you'll need to write an Expo Config Plugin[1]). You will no longer commit the ios/android native code to your repository, and instead let it be procedurally built.
This resolved a lot of environment issues developers would often run into, and greatly simplified onboarding new devs. You can build your iOS/Android apps through the CI with ease. And you'll no longer be afraid of upgrading React Native, as Expo will handle all of the breaking changes in the native code for you.
My guess is that Shopify started with bare metal React Native apps (which I would have done the same 5 years ago), and now migrating back to Expo-managed projects is nontrivial. At my work we only manage one app, and it was well worth migrating back.
[0] https://docs.expo.dev/workflow/continuous-native-generation/
I’m not sure I would consider 0.5 seconds to be blazing fast.
I wish the article went into detail on what these screens do and what a screen load means exactly.
The wider noise around React Native is seemingly that it works, especially while iterating on things, but it makes the final 20% of work much harder than it already was. As one person put it to me recently “with RN you just have to face the fact you won’t be winning any design awards”.
What really amazes me is how far React Native and web React have separated, to the point using the web one is a complete non event.
> We’ve achieved sub-500ms (P75) screen loads in the Shopify app
Pick 1.
Also interesting that this deep care about performance extends to blogs, where a simple animated image showing how awesome hot reload is causing a noticeable delay in scrolling
https://news.ycombinator.com/item?id=34263628
Will another 10 years go by and there still won't be a dark mode for the app?
As someone who uses the mobile app basically every day, it is absolutely one of the things that bothers me, every single time I use it. That's not a good thing.
Apple just keeps making billions and billions by focusing on UX, when other ”tech” companies are satisfied with this garbage.
I've seen many iOS projects overwhelmed by tech debt while its Android counterpart was still OK-ish. I don't believe this is coincidence.
So how hard is it to apply React Native the correct way? Having a dedicated team of dozens of engineers including native experts for each platform is different than your average 4-8 people dev (web, API, iOS, Android) team. Let alone if you only have people experienced in web doing the work.
When I build Swift applications the fact they have sub 500ms loads is not an achievement, they're simply already doing that without me trying. But I have found the right way to build iOS apps myself over the years, very little help from Apple.
https://infrequently.org/2024/11/if-not-react-then-what/#fn-...
That's a difficult to interpret metric. If it's only being met 75% of the time, I'd tend to assume most features are much better than that, but some are never meeting the target, and there's no indication by how much.
Hahaha we are absolutely cooked.
I frequently encounter Shopify e-commerce in the wild, and it’s my most disliked experience. From browsing the stores to checkout, it always feels clunky.
I always shrugged it off as iOS bullshit but now I know the real reason. It’s just slow enough to make you doubt yourself - it’s not the website, it’s probably my shitty {phone|poor internet|computer}
Related
React Native team says "Use Expo"
The React Conf suggests using a React Native framework like Expo for app development, offering essential APIs for navigation, data fetching, and state management. Expo simplifies upgrades and tooling, while custom frameworks are an option. The React Native team endorses Expo as the primary community framework, with support for using React Native without a framework. The guidance is reflected in the updated Getting Started page, and a detailed RFC0759 explains the rationale and potential future recommendations for fostering competition and innovation in the React Native ecosystem.
Migrating Coinbase's 56M Users to React Native: Key Lessons and Takeaways
Coinbase transitioned 56 million users to React Native, addressing performance challenges like re-rendering. Nick Cherry discussed platform-specific optimizations, Farcaster/Warpcast development, React Navigation, Expo benefits, and AI in front-end development. StepChange offers database modernization services.
Migrating Coinbase's 56M Users to React Native: Key Lessons and Takeaways
Coinbase migrated 56 million users to React Native, addressing performance challenges like re-rendering. Nick Cherry discussed platform-specific optimizations, Farcaster/Warpcast development, Expo benefits, and StepChange's expertise in modernizing databases for improved scalability.
New Architecture is here
React Native 0.76 introduces a New Architecture as default, enhancing performance with modern features, synchronous communication, and improved rendering. It has been successfully used in major apps like Facebook and Instagram.
Rewrite it in Rails
The author developed a customs declaration app in Ruby on Rails, faced challenges rewriting it in Rust and SvelteKit, and ultimately returned to Rails for its rapid development benefits and collaboration.