T
NativeUIBridge
Runs plugin worklets on the UI runtime, where native views live, so hooks there act before the next frame.
type NativeUIBridge = { … }Members
call
<A extends NativeUIArgument[], R extends void | NativeSerializable>(worklet: (...args: A) => R, ...args: A): NativeCancelablePromise<R>Runs a worklet on the UI runtime and resolves with what it returns, which must be serializable.
callback
<A extends NativeSerializable[]>(listener: (...args: A) => void): (...args: A) => voidWraps a JS-thread listener so a worklet can call it, for example to wake JS only for the hook events that need it; it stops calling the listener once the plugin stops.
Opens a scope with every synchronous method the plugin's capabilities allow; capture it in a worklet.
run
<A extends NativeUIArgument[]>(worklet: (...args: A) => void, ...args: A): voidQueues a worklet on the UI runtime.