React Native Runtimes

Overview

React Native Runtimes lets a React Native app run UI and state work across multiple named JavaScript runtimes.

React Native Runtimes is a pair of React Native libraries that let your app run UI and state work across several JavaScript runtimes:

When you use both together, your main runtime stays free for navigation, gestures, and animations while another runtime owns the heavy work — chat screens, infinite lists, sync engines, headless hydration, or anything that would otherwise block the UI.

Why two runtimes?

In React Native, all your JS — list rendering, sync, parsing, every business function — competes for one thread. A blocked main runtime means dropped frames, janky scroll, and slow navigation. With React Native Runtimes you push that work onto a named secondary runtime and keep the main one responsive.

Start here

What you can build

Mental model

  • A runtime is identified by a string like conversation-42-runtime.
  • A threaded component is a React component registered with threadedComponent (or by being a direct child of OnRuntime).
  • A threaded surface is a native view that asks a named runtime to render a registered component.
  • A prewarmed runtime is one that started before its UI is visible.
  • A headless task runs JS on a named runtime without mounting any UI.
  • A shared store synchronizes state across runtimes through native C++.

Tip

Pick runtime names per logical owner, not per screen mount. One runtime per conversation, one per feed type, one background for app-lifetime work. Stable names let you prewarm, hydrate, and reuse them.

When to reach for it

Use a threaded runtime when the main JS runtime should stay responsive while another runtime owns part of the UI — chat, feeds, document parsing, big lists, animation-heavy screens.

Use the shared store when data is too large, mutable, or frequently changing to pass as JSON props through the threaded boundary.

Use a background runtime for app-lifetime work that has no UI — sync engines, caches, queues, crypto, local search indexing.

On this page