Full support for react-native-reanimated 4 and worklets#2660
Open
PedroAugustoRamalhoDuarte wants to merge 7 commits into
Open
Full support for react-native-reanimated 4 and worklets#2660PedroAugustoRamalhoDuarte wants to merge 7 commits into
PedroAugustoRamalhoDuarte wants to merge 7 commits into
Conversation
This commit updates the library to fully support React Native Reanimated v4, migrating from deprecated APIs to the new react-native-worklets package. Changes: - Updated babel.config.js to use 'react-native-worklets/plugin' instead of 'react-native-reanimated/plugin' - Added 'react-native-worklets' as a peerDependency (>=0.7.0) - Migrated all 'runOnJS' calls to 'scheduleOnRN' from react-native-worklets - Migrated all 'runOnUI' calls to 'scheduleOnUI' from react-native-worklets - Removed deprecated 'addWhitelistedUIProps' call (now handled by default in Reanimated 4) - Updated README.md with Reanimated 4 support information and New Architecture requirement Breaking changes for users: - Reanimated 4 requires New Architecture (no support for Legacy Architecture) - 'react-native-worklets' package must be installed when using Reanimated 4 Closes gorhom#2223
…compatibility instructions
Fix package build
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.
Overview
Adds complete support for React Native Reanimated 4. This is a critical change for the ecosystem, especially
for Expo 54+ and Expo Go users, which now ship with Reanimated 4 and workouts by default.
What Changed
Core API Migration
Following this migration guide: https://docs.swmansion.com/react-native-reanimated/docs/guides/migration-from-3.x
New Peer Dependency
Babel Configuration
Documentation
Tests
Tested with my app:
Probably you want to make a new v6 with reanimated 4, let me know if you need some changes in this PR