react / runOnMainThread
runOnMainThread allows triggering main thread functions on the main thread asynchronously.
| Type Parameter |
|---|
Fn extends (...args: any[]) => any |
| Parameter | Type | Description |
|---|---|---|
fn | Fn | The main thread functions to be called. |
Function
A function. Calling which with the arguments to be passed to the main thread function to trigger it on the main thread.
| Parameter | Type |
|---|---|
...args | Parameters<Fn> |
void
@lynx-js/react/runtime/lib/worklet/runWorklet.d.ts:7