Repository navigation
chore(🐎): move off worklets' deprecated runOnUI and runOnRuntime - #546
Merged
wcandillon merged 4 commits intoOct 16, 2026
Merged
Conversation
react-native-worklets deprecates runOnUI for scheduleOnUI and runOnRuntime for scheduleOnRuntime from 0.7.2, the lowest version the peer range accepts. The example screens and helpers, the docs and two JSDoc comments use the scheduling functions now. Both deprecated functions only forward to them, so nothing changes today; once worklets drops them, the examples keep running.
wcandillon
self-requested a review
October 16, 2026 12:02
wcandillon
approved these changes
Oct 16, 2026
|
🎉 This PR is included in version 0.16.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
react-native-workletsdeprecatesrunOnUIforscheduleOnUIandrunOnRuntimeforscheduleOnRuntimefrom 0.7.2, the lowest version this package'speerDependenciesaccept. The example's screens and helpers, the docs and two JSDoc comments still use the deprecated functions; the library itself calls neither.Solution
runOnUI(fn)(...args)becomesscheduleOnUI(fn, ...args)andrunOnRuntime(runtime, fn)(...args)becomesscheduleOnRuntime(runtime, fn, ...args)everywhere. The deprecated functions return a closure that makes exactly that call, so nothing behaves differently, and the examples keep running once worklets removes them. This is wcandillon/react-native-skia#4213 for this repo.Verification
yarn lint·yarn tsc·yarn turbo run build --filter='./packages/*'· the Expo template's web build ·yarn test:plugin·yarn check-dawn·yarn build:docs(twoslash type-checks the changed samples). CI's Android e2e step (debug build, Metro withCI=true) on a Galaxy S23 (Android 14): 43 suites and 215 tests passed,WorkletSerializationandImplicitDeviceSyncamong them. On the same device, the Worklet requestAdapter diagnostic gets an adapter on the UI runtime, with and withoutinstallWebGPU(), and the Reanimated example's Dedicated Thread and Async Buffer (Dedicated) screens render on their worklet runtimes. Not run here: the iOS e2e job, which needs a simulator, and the semantic-release dry run, which needs the repository's token.