@lynx-js/react / runOnMainThread
Function: runOnMainThread()
runOnMainThread allows triggering main thread functions on the main thread asynchronously.
Type Parameters
Parameters
Returns
Function
A function. Calling which with the arguments to be passed to the main thread function to trigger it on the main thread. This function returns a promise that resolves to the return value of the main thread function.
Parameters
Returns
Promise<R>
Example
Defined in
@lynx-js/react/runtime/lib/worklet/call/runOnMainThread.d.ts:19