Profile React Components in React Native Release Builds

For years, web developers have enjoyed the luxury of profiling React components in near-production environments using "profiling builds." On the mobile side, however, React Native developers were largely left in the dark. Until now.

Thanks to our new library, @callstack/inspector, that gap is finally closed.

With Inspector you can now profile your React components directly within a release build with profiling functionality. This way you can get a better overview of your app’s performance the way your users experience it, without the development-only debug code that slows down JavaScript execution considerably.

Let’s walk through how to set this up step-by-step using an Expo application.

Getting Started

First, let’s bootstrap a fresh Expo application using SDK 55. We will name this project my-expo-app:

npx create-expo-app@latest --template default@sdk-55

Installation

Next, we need to install the inspector package alongside a required development dependency for Metro:

npm i @callstack/inspector
npm install --dev @react-native/metro-config@0.83.6

Configuration

1. Update Metro Configuration

Because the default Expo template doesn't ship with a metro.config.js file, we need to generate one first. Execute the following command:

npx expo customize metro.config.js

Now, open your newly created metro.config.js and wrap your configuration with withInspector:

const { getDefaultConfig } = require('expo/metro-config');
+const { withInspector } = require('@callstack/inspector/metro');

const config = getDefaultConfig(__dirname)

+module.exports = withInspector(config, true);

2. Create a Custom Entry Point

We need to import the inspector at the absolute top level of the application. To do this, create an entry.tsx file in your root directory:

// Register the inspector at the very top 👇
import "@callstack/inspector";
import { ExpoRoot } from "expo-router";
import { AppRegistry } from "react-native";

function App() {
  const ctx = require.context("./src/app");
  return <ExpoRoot context={ctx} />;
}

AppRegistry.registerComponent("main", () => App);

Next, point your package.json to this new entry file instead of the default Expo Router entry:

{
  "name": "my-expo-app",
  "main": "./entry.tsx",
  "version": "1.0.0"
}

Running and Profiling

With the configuration out of the way, spin up the new inspector command in your terminal:

npx inspector start

Your terminal output should look like this:

Because Expo Go does not support release builds, you will need to run a local native prebuild using the release configuration to test this out.

npx expo run:ios --configuration Release
For Android, No extra configuration tweaks are required. Simply run your application with the release variant, start the inspector once the emulator launches, and begin profiling🚀

Once your app builds and launches, you are ready to start profiling and analyzing your runtime performance!

Final Words

Profiling production-ready builds gives you the ground truth about your app's performance the same way your users experience it, allowing you to make high-impact optimization decisions with confidence. Because @callstack/inspector requires zero native code changes, integrating it into your workflow is incredibly friction-free.

Cherry on the top is that you can also leverage React.Profiler to collect performance metrics via the onRender callback during release builds and handle that data however you see fit—whether that's logging it locally or upstreaming it to an analytics service.

Want to try it on a bare React Native application? It takes just three simple steps. Head over to the official @callstack/inspector repository to check out the documentation, and don't forget to leave a star! ✨

Insights

Learn more about Performance

cover

Jul 3Podcast

Why Nitro Is More Than a Faster Bridge

Marc Rousavy (Margelo) talks Nitro modules, native state, zero-copy data, Vision Camera, and why speed is only part of the story.

cover

Nov 21Article

Memory Ownership Models: When JavaScript Meets Native Code

A deep dive into how React Native handles memory when JavaScript and native code share ArrayBuffer data. Learn why async processing can break, how GC affects raw pointers, and the safe patterns for building high-performance native integrations.

cover

Oct 14Article

From Files to Buffers: Building Real-Time Audio Pipelines in React Native

Learn how to move beyond file-based audio APIs and work directly with in-memory PCM data in React Native. This guide shows how to construct WAV buffers, use JSI for zero-copy transfers, and enable real-time audio processing.

cover

Sep 8Article

How to Add Custom JSI Bindings in Your TurboModule (and Why You Might Need Them)

TurboModules provide a type-safe way to write native code in React Native. JSI sits underneath as a lower-level API, enabling direct interaction with the JavaScript runtime. Beyond what TurboModules expose, JSI gives you access to powerful features, such as working directly with ArrayBuffers. This article shows how to inject a custom binding step by step.

cover

Jul 24Article

Exploring Fibers: Cooperative Multitasking and Lock-Free Task Execution

Explore how fibers enable lightweight, cooperative multitasking. This guide walks through building a simple scheduler, managing task dependencies without locks, and using Tracy to visualize performance.

cover

May 21Article

Multithreading Isn’t Free: Performance Pitfalls Visualized

Learn how to profile and optimize multithreaded apps. Discover why more threads don’t always mean faster results and how bad thread contention really is.

Event Cover

Apr 28Webinar

Master JavaScript Performance in React Native (Part 2)

Learn to fix JS performance issues in React Native-from debounce bugs to Redux selectors, in this hands-on webinar with real code examples.

Events Cover

Apr 24Talk

Tips & Tricks From The Ultimate Guide to React Native Optimization 2025

View flattening, React 19 hooks, real DevTools tips-learn what actually helps your React Native app run faster.

Events Cover

Apr 24Talk

User-Focused Performance Tracking

Discover how Expensify defines and tracks performance metrics that actually impact user experience.

cover

Apr 11Article

Profiling React Native Internals with Tracy for Peak Performance

Learn how to profile React Native internals with Tracy to uncover bottlenecks, optimize performance, and gain deep insights into your app’s native behavior.

cover

Dec 18Podcast

React Native FastIO: Nitro-Powered Performance Boost

Listen to Mike Grabowski talk about React Native FastIO, a collection of primitives for working with data in React Native and its performance benefits.

cover

Oct 15Podcast

Superfast Nitro Modules With Marc Rousavy

Even faster React Native apps? That's possible with Nitro Modules! Tune in to the conversation with their creator, Marc Rousavy.

cover

Mar 19Tutorial

The Hard Way vs. The React Native AI SDK Way: Stop Writing Custom Modules for Every Model

Learn how React Native AI uses a unified provider model to switch between cloud and on-device LLMs without rewriting application logic, enabling reliable AI experiences online and offline.

cover

Mar 12Tutorial

Build Smarter Apps: Tool Calling & AI Orchestration Explained

Learn how on-device models in React Native can call tools, interact with external APIs, and return structured outputs you can use directly in application logic.

cover

Mar 5Tutorial

MLC LLM + React Native: On-Device AI Without the Pain

Learn how to run third-party on-device LLMs in React Native using MLC LLM. Choose your models, run them efficiently across platforms, and keep a unified JavaScript API with React Native AI.

cover

Feb 24Tutorial

Intelligent Fallbacks with Apple Intelligence in React Native

Learn how to use Apple’s built-in Foundation Models in React Native apps, reduce memory usage, and enable fast, fully on-device AI with React Native AI Apple.

cover

Feb 10Tutorial

What Is the React Native AI SDK? A Complete Intro & Quickstart

Learn why on-device AI matters for React Native apps, how local LLMs behave offline, and what problems React Native AI is designed to solve from day one.

cover

Jan 29Tutorial

Implementing an Android TurboModule with Kotlin

Learn how to implement a React Native TurboModule on Android, from the TypeScript spec and Codegen to the Kotlin implementation and package registration.

cover

Jan 19Tutorial

Working with Different Threads in Swift TurboModules

Learn how JavaScript, native module, background, and main threads interact in React Native TurboModules, and how to use GCD queues to run async work safely in Swift.

cover

Jan 9Tutorial

How to Add Type-Safe Constants to Swift TurboModules

Learn how to expose typed, immutable constants from a Swift TurboModule using Codegen, and get full end-to-end type safety between native and JavaScript.

cover

Dec 30Tutorial

Adding Event Emitters to Your TurboModule in Swift

Learn how to emit native events from a Swift TurboModule and subscribe to them in JavaScript, including proper memory management and Codegen integration.

cover

Dec 22Tutorial

Writing Your First TurboModule in Swift

Learn how to build a fully working TurboModule in Swift, integrate it with Codegen, and bridge it through Objective‑C inside an Expo app.