margelo

Run heavy React Native components and business logic in isolated Hermes runtimes (without freezing your main JS thread)

30
2
100% credibility
Found Jun 01, 2026 at 30 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

react-native-runtimes is an open-source library by Margelo that adds multi-runtime support to React Native apps. It lets developers run selected screens, components, or background tasks in isolated JavaScript runtimes so heavy work doesn't freeze the main app. The project includes two packages: one for mounting threaded components and managing runtimes, and another for sharing state across runtimes through a native C++ store. It requires React Native's New Architecture and Hermes engine, works on both Android and iOS, and includes Expo support through a config plugin.

How It Works

1
💬 Your app gets slow

A user notices their chat screen freezes when loading lots of messages, making the app feel sluggish during conversations.

2
🔍 You discover threaded runtimes

You find react-native-runtimes, which lets you run heavy parts of your app in separate, isolated workers so they don't block the main screen.

3
You wrap your heavy screen in a special container

With just one special tag around your message list, it runs in its own dedicated runtime — no complex setup required.

4
You prewarm the runtime before the user navigates

You start the secondary runtime early, so when someone taps to open the chat, it's already warmed up and ready to go.

5
You have two ways to share data between runtimes
🗄️
Shared store path

You create a shared store where any runtime can read and write data synchronously, and all subscribers get notified instantly.

📞
Function call path

You mark a function to always run on a background runtime, and call it from anywhere — the system handles the routing automatically.

6
🎉 Your app feels fast and responsive

Heavy screens run in their own space, animations stay smooth, and users can navigate without waiting for things to load.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 30 to 30 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is react-native-runtimes?

React-native-runtimes solves the age-old React Native problem where one greedy screen freezes your entire app. It lets you spin up isolated Hermes JavaScript runtimes and mount specific components, screens, or background tasks in them. The main thread stays responsive while heavy work runs elsewhere. TypeScript throughout, with native Android and iOS code backing the runtime management. You wrap a component in `OnRuntime`, Metro rewrites it at build time, and that component renders in its own Hermes instance. It also ships a Zustand-style shared state store backed by a native C++ singleton so different runtimes can read and write state without bridge round-trips.

Why is it gaining traction?

The hook is simplicity: you drop in a component wrapper and heavy work moves off the main thread with no manual runtime plumbing. Developers running heavy chat feeds, complex lists, or data-heavy editors finally have a clean escape hatch without rewriting their architecture. The prewarming API lets you start a runtime before navigation so expensive screens appear instantly. Cross-runtime function calls and headless background tasks cover the "run heavy task" scenarios that used to require native modules or workarounds.

Who should use this?

Mobile devs on React Native 0.76+ with New Architecture who have one or two features monopolizing their JS thread. If your chat screen janks on mount or your analytics dashboard blocks gestures, this is for you. Teams running heavy background work like store hydration or data decoding will appreciate the headless task API. If your app is already well-optimized with virtualization and memoization, you do not need this yet.

Verdict

At 30 stars and 1.0% credibility score, this is early-stage software with real engineering behind it but unproven at scale. The docs are solid and the API is thoughtful, but you would be an early adopter. Worth evaluating in a side branch to run your heavy task scenarios, but hold off on production use until the community validates it.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.