alewin/useWorker
⚛️ useWorker() - A React Hook for Blocking-Free Background Tasks observed · 2026-08-28
Health v2 · maintenance only
68/100
- Activity 86
- Release rhythm 28
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 65.5
- age_days: 2419
- days_rel: 542
- days_push: 88
- n_releases_24m: 3
Adoption not part of the score
3113 stars · 106 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
useWorker() is a small React hook library that lets you run expensive JavaScript functions in Web Workers without blocking the UI, using a Promise-based API instead of raw worker message events. It supports TypeScript, timeouts, remote dependencies, transferable objects, and automatic worker cleanup.
Use cases
- sort large arrays without freezing the UI
- parse or generate CSV files in the background
- run CPU-intensive calculations off the main thread
- use web workers with a simple React hook syntax
- offload expensive functions from React components
- run external scripts inside a web worker
When to choose
- you use React and need non-blocking background tasks
- you want a Promise-based alternative to raw Web Worker messaging
- you need a tiny (<3KB) worker abstraction with TypeScript support
- you want automatic worker lifecycle management with timeouts
When to avoid
- your project does not use React
- your worker function needs DOM or window access
- you need to run the same worker concurrently while it is busy
- your function returns non-serializable values like functions
Facets
library · maturity maintenance
concurrency developer-tools web-development frontend developer-tools browser react-hook web-workers non-blocking-ui typescript promises javascript react
7 sources
- readme: https://github.com/alewin/useWorker · fetched 2026-08-28 · c86600e02471
- homepage: https://useworker.js.org/ · fetched 2026-08-29 · 4431efac54fa
- site_page: https://useworker.js.org/docs/introduction · fetched 2026-08-29 · 32cedf335454
- site_page: https://useworker.js.org/docs/installation · fetched 2026-08-29 · 22b0ff3db8b0
- site_page: https://useworker.js.org/docs/api-useworker · fetched 2026-08-29 · fdb118ab2bee
- site_page: https://useworker.js.org/docs/examples/examples-sort · fetched 2026-08-29 · 0003e5499b2e
- site_page: https://useworker.js.org/docs/limitations · fetched 2026-08-29 · 3e85550e4eb3
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| alewin/useWorker | main | 68 |
For agents
markdown · JSON · MCP: product_card(name="alewin/useWorker")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem