Skip to content

Open source

react-native-native-worker

A published npm package that brings true native background threading to React Native, so heavy work never blocks the JS thread.

My role
Author and maintainer
Stack
TypeScriptSwiftKotlinReact Native

The problem

React Native's single JavaScript thread becomes a bottleneck for heavy processing, causing frozen UI and dropped animations.

What I built

  • Native modules in Swift (DispatchQueue on iOS) and Kotlin (HandlerThread on Android) behind one TypeScript API.
  • Thread-safe queue management with atomic operations, task cancellation, monitoring and real-time event updates.
  • TypeScript-first with full type definitions, zero external dependencies, and 27 tests with 70%+ coverage.

How it fits together

  1. JS task
  2. TypeScript API
  3. Native queue
  4. Swift / Kotlin worker
  5. Result event to JS

Highlights

  • Zero dependencies
  • Cancellation and monitoring built in
  • Published v1.0.0 on npm