margelo / react-native-runtimes
PublicRun heavy React Native components and business logic in isolated Hermes runtimes (without freezing your main JS thread)
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
A user notices their chat screen freezes when loading lots of messages, making the app feel sluggish during conversations.
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.
With just one special tag around your message list, it runs in its own dedicated runtime — no complex setup required.
You start the secondary runtime early, so when someone taps to open the chat, it's already warmed up and ready to go.
You create a shared store where any runtime can read and write data synchronously, and all subscribers get notified instantly.
You mark a function to always run on a background runtime, and call it from anywhere — the system handles the routing automatically.
Heavy screens run in their own space, animations stay smooth, and users can navigate without waiting for things to load.
Star Growth
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 RepurposeSimilar repos coming soon.