WhoBuilt

Tips & Tricks From the Ultimate Guide to RN Optimization 2025

Jun 4, 2025· 11 min· 1.8K views·Watch on YouTube

Speaker

Oskar Kwaśniewski, senior software engineer at Callstack and a React Native contributor, shares optimization tips from the Ultimate Guide to React Native Optimization.

Measure startup time and responsiveness

Kwaśniewski explains that time to interactive (TTI) measures the time from opening the app to seeing meaningful content, and distinguishes cold, warm, hot, and iOS prewarm starts. React Native Performance can track lifecycle events such as `nativeLaunchStart` and `runJSBundleStart`; iOS prewarming can complicate measurements. For frame rate, the Dev Menu shows UI and JavaScript thread FPS, while Flashlight can track performance over time on Android.

Use concurrent rendering for smoother input

Concurrent React can pause or abandon rendering work, and React Native requires the New Architecture to use these features. Kwaśniewski demonstrates `useDeferredValue` with a slow component: deferring its updates keeps text input more responsive while the component still renders.

Reduce unnecessary work with the React Compiler and native libraries

The React Compiler is a Babel plugin that memoizes values and can reduce unnecessary renders, provided the code follows React’s rules. In the Expensify app, enabling it resulted in up to 4.3% faster TTI; apps that are already heavily memoized may see smaller gains. For heavy JavaScript-thread computation, he cites React Native Quick Crypto as up to 58 times faster than CryptoJS by using C++.

Keep native view hierarchies and bundles efficient

View flattening merges layout-only nodes to simplify the native hierarchy, but can change how many children a native component receives. Setting `collapsable={false}` on a view preserves it when the expected child count matters. Kwaśniewski also recommends disabling Android bundle compression so Hermes can use memory mapping; this is the default from React Native 0.79, and older versions can add `noCompress` in `build.gradle` for around 12% faster TTI, as stated in the transcript.

Takeaways

  • Measure TTI across startup types, and account for iOS prewarming when interpreting results.
  • Use `useDeferredValue` to keep urgent interactions responsive while slower rendering continues.
  • Try the React Compiler, but compare results against your app’s existing memoization and measured TTI.
  • Move heavy computation off the JavaScript implementation when a suitable React Native native library is available.
  • Check view flattening where native child counts matter, and check Android bundle compression for Hermes memory mapping.

Mentioned in this talk

Search inside this talk

What was claimed 14

Related talks