@lynx-js/react / runOnBackground
runOnBackground allows triggering js functions on the background thread asynchronously.
| Type Parameter |
|---|
R |
Fn extends (...args: any[]) => R |
| Parameter | Type | Description |
|---|---|---|
f | Fn | The js function to be called. |
Function
A function. Calling which with the arguments to be passed to the js function to trigger it on the background thread. This function returns a promise that resolves to the return value of the js function.
| Parameter | Type |
|---|---|
...args | Parameters<Fn> |
Promise<R>
@lynx-js/react/runtime/lib/worklet/call/runOnBackground.d.ts:19