Documentation NPM GitHub

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.

Web
iOS
Android
// One codebase, multiple platforms const worker = new Worker( new URL('./worker.ts', import.meta.url) );

Persistent & parallel

Workers run in dedicated threads and stay alive until terminated. Great for worker pools.

t ->

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.

Just works

Familiar developer experience

Write workers just like you would for the web. We handle the native bridging, bundling, and threading complexity for you.

1

Create a worker

Create a standalone file for your background logic.

2

Instantiate & communicate

Use the standard `new Worker()` API and `postMessage`.

App.tsx
Main thread
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 thread
// 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.