useWorker
Use web workers with react hook.
? Features
- Run expensive function without blocking UI (Show live gif)
- Supports Promises pattern instead of event-messages
- Size: less than
3KB
! - Clear API using hook
- Typescript support
- Garbage collector web worker instance
- Remote dependencies option
- timeout option
? Install
- @latest
? Import
? Usage
? Examples
More examples: https://github.com/alewin/useWorker/tree/develop/example
? Roadmap
- [x] Kill Web Worker
- [x] Reactive web worker status
- [x] Add timeout option
- [x] import and use remote script inside
useWorker
function - [ ] support Transferable Objects #47
- [ ] import and use local script inside
useWorker
function #37 - [ ] useWorkers Hook #38