useBlockingTask
useBlockingTask
hook provides a way to run an async function.
For offline processing, it will additionally block processing until that Promise resolves. As long as there are unresolved blocking tasks, the rendering for the next timestamp will not start.
Reference
Arguments
fn
Async function that hook should execute while blocking processing.
- Type:
number
Returns
The value returned by fn
function or undefined
.
- Type:
<T> | undefined