Function: useWorkletCallback()
useWorkletCallback<
T
>(callback
): (...args
) =>Promise
<ReturnType
<T
>>
Creates a callback that can be executed in he separate worklet thread of the engine.
Type Parameters
• T extends (...args
) => any
Parameters
• callback: T
Returns
Function
Parameters
• ...args: Parameters
<T
>
Returns
Promise
<ReturnType
<T
>>