Z
Zyeon UI

useWorker · Zyeon UI

Run a pure function off the main thread: the function is stringified into a Blob worker, every call is a promise matched back by id so out-of-order completions land on the right caller, transferables move in both directions, task errors reject without replacing the worker, and everything is terminated on unmount.

npx shadcn@latest add @zyeon/use-worker
Preview useWorker on Zyeon UI's site (opens in a new tab)

Not checked yet

Zyeon UI limits how often it can be asked, and useWorker hasn't had its turn. Its source will show here once it has.