Function: useWorker()
useWorker<
T
>(worker
):T
Gets a shared instance of the ref-counted worker proxy.
The worker instance will be created on the first call and disposed when the last component using the hook is unmounted.
See @reactodia/worker-proxy
for more information on working with transparent Web Worker proxies.
Type Parameters
Type Parameter |
---|
|
Parameters
Parameter | Type |
---|---|
|
|
Returns
T