Threading
Run work on another runtime, return a result, or create a worker for background calculations. Start with Running worklets on the UI runtime to compare asynchronous and synchronous calls. See Call tables for which runtimes can call each API.
Run on the UI Runtime
scheduleOnUI— Schedule work without waiting for a result.runOnUIAsync— Run work asynchronously and await its result.runOnUISync— Run work synchronously on the calling thread, blocking until the result is ready.UIRuntimeId— Identify the UI Runtime when an API takes a runtime ID.
Run on a Worker Runtime
createWorkletRuntime— Create and configure a worker runtime.scheduleOnRuntime— Schedule work on a worker without waiting for a result.runOnRuntimeAsync— Run work on a worker and await its result.runOnRuntimeSync— Access a worker runtime synchronously from the calling thread.
Return to the RN Runtime
scheduleOnRN— Schedule a function on the React Native runtime, for example to update React state.
Address a runtime by ID
Use these variants when you have a runtime ID instead of a WorkletRuntime object.
scheduleOnRuntimeWithId— Schedule work without waiting for a result.runOnRuntimeAsyncWithId— Run work asynchronously and await its result.runOnRuntimeSyncWithId— Run work synchronously and return its result.
Deprecated APIs
For new code, use the replacements linked from these reference pages.
runOnUI— UsescheduleOnUI.runOnJS— UsescheduleOnRN.runOnRuntime— UsescheduleOnRuntime.executeOnUIRuntimeSync— UserunOnUISync.callMicrotasks— Legacy helper for manually flushing UI microtasks.