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
- JS task
- TypeScript API
- Native queue
- Swift / Kotlin worker
- Result event to JS
Highlights
- Zero dependencies
- Cancellation and monitoring built in
- Published v1.0.0 on npm