True multithreading
for React Native.
Run standard Web Workers in React Native.
Offload heavy computations and keep your UI running at 60 FPS.
Don't block the main thread
React Native apps often suffer from frame drops when processing heavy logic. Web Workers solve this by moving the work elsewhere.
Isomorphic by design
Write your background logic once and run it everywhere. The same `Worker` API works on React Native (iOS/Android) and the browser.
Persistent & parallel
Workers run in dedicated threads and stay alive until terminated. Great for worker pools.
Native networking
Includes a high-performance `fetch` implementation backed by native platform networking.
fetch() Built-in NSURLSession iOS OkHttp Android Zero configuration
Integrates seamlessly with Metro. No complex bundler setup required.
Familiar developer experience
Write workers just like you would for the web. We handle the native bridging, bundling, and threading complexity for you.
Create a worker
Create a standalone file for your background logic.
Instantiate & communicate
Use the standard `new Worker()` API and `postMessage`.
import { Worker } from 'react-native-webworker';
// Start a new thread
const worker = new Worker(new URL('./worker.ts', import.meta.url));
worker.onmessage = (event) => {
console.log('Result from background:', event.data);
};
// Send heavy data off the UI thread
worker.postMessage({
task: 'process_image',
payload: largeBuffer
}); // worker.ts
// 🚀 This runs in a separate thread!
self.onmessage = (event) => {
const { task, payload } = event.data;
// Do heavy computation...
const result = heavyProcessing(payload);
// Send result back
self.postMessage(result);
}; Ready to optimize?
Start using React Native WebWorker today and deliver smoother experiences to your users.