Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Shopify Engineering 11 min read How-to mediumAdept

Our Solution for Measuring React Native Rendering Times

Shopify's open-source @shopify/react-native-performance library measures Time To Interactive in React Native apps across three scenarios: app startup, navigation between screens, and screen re-renders. It defines "rendered" by injecting an invisible marker view whose native counterpart reports when it reaches the window, so measurements include bridge communication. A state machine tracks render passes (interactive or not) and emits RenderPassReports, including a frustration signal when users leave before a screen becomes interactive. Integration requires hooks in Android, iOS and TypeScript, plus optional react-navigation wrappers. Reports can be forwarded to analytics tools such as Amplitude to track p99 TTI per screen and Apdex scores.

Related posts

  • More ways to debug Expo apps with the React Native SDK

    Sentry mediumAdept

    Sentry's React Native SDK now ships a first-class, auto-registering Expo Router integration that traces screen focus and imperative router calls (via wrapExpoRouter), correlates deep links with the navigation they trigger, and captures errors from per-route ErrorBoundaries, which a Babel plugin can wrap automatically at build time. Route attributes that may contain user identifiers are gated behind sendDefaultPii. Other additions include Time to Full Display via reportFullyDisplayed(), timing spans for OTA update check and download, and source map upload improvements. Network tracking is restored on Expo SDK 56+, whose native fetch bypasses XMLHttpRequest and had silently dropped requests from traces.

  • Improving Shopify App’s Performance

    Shopify Engineering mediumAdept

    Shopify cut its React Native mobile app's P75 launch time by 44% and screen load times by 59% over 2023, against targets of 2s launch and 500ms critical-screen loads. The fixes fell into three themes. The first was deferring work until it is needed: FlashList-based LazyScrollView and ListSource render only visible content, inlineRequires in the Metro config alone gave a 17% launch gain, and slow native modules were fixed. The second was eliminating unnecessary work: freezing back-stack screens cut navigation time by up to 70%, Restyle allocations were trimmed, and default state batching improved screen loads by about 15%. The third was maximizing cache use by fixing a GraphQL cache bug and pre-warming caches so up to 90% of merchants see cached data first.

  • Five years of React Native at Shopify

    Shopify Engineering easyNovice

    After 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.

  • Accelerating Mobile App development at Zalando with Rendering Engine and React Native

    Zalando Engineering mediumAdept

    Zalando is incrementally migrating its separate iOS and Android apps to React Native by reusing Rendering Engine, its React-based web framework whose "renderers" bundle data fetching, caching, observability and tracking into components. React Native ships as a package: an npm "Entry Point" is consumed both by a standalone developer app and by a native SDK exposing a simple view-factory interface. Native interop goes through turbo modules plus injected protocols, which developers can mock. UI is shared with web through react-strict-dom and StyleX, with Metro platform-specific files and compat APIs covering cases one shared implementation can't handle.

  • Migrating our Largest Mobile App to React Native

    Shopify Engineering mediumAdept

    Shopify 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.

The quest for software engineering knowledge.

Look:
Layout: