react / runOnBackground

Function: runOnBackground()

function runOnBackground<Fn>(f: Fn): (...args: Parameters<Fn>) => void

runOnBackground allows triggering js functions on the js context asynchronously.

Type Parameters

Type Parameter
Fn extends (...args: any[]) => any

Parameters

Parameter Type Description
f Fn The js function to be called.

Returns

Function

A function. Calling which with the arguments to be passed to the js function to trigger it on the js context.

Parameters

Parameter Type
...args Parameters<Fn>

Returns

void

Defined in

@lynx-js/react/runtime/lib/worklet/runWorklet.d.ts:14

除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。