In this article
Key Changes
- Released Reanimated 4.0.0 as a stable version.
- Renamed
useScrollViewOffsettouseScrollOffset, now compatible with all scrollable components. - Improved layout animations, including fixes for reparenting, sticky headers, dynamic updates, and precision issues.
- Improved web support, addressing issues with CSS animations and transitions.
- Introduced Worklet version validation and troubleshooting to ensure that the compatible version of
react-native-workletsis used with Reanimated. - Support for React Native 0.80 and 0.81.
- Removed legacy architecture code and deprecated APIs.
What's Changed
- fix: TVOS example crashing right after launch by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7599
- docs: Add 3.18 to compatibility by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/7605
- chore(deps): bump undici from 6.21.1 to 6.21.3 by @dependabot[bot] in https://github.com/software-mansion/react-native-reanimated/pull/7532
- docs: Fix typo in scroll offset example by @n3ps in https://github.com/software-mansion/react-native-reanimated/pull/7533
- fix: bump to C++20 by @okwasniewski in https://github.com/software-mansion/react-native-reanimated/pull/7607
- fix: Crash in useScrollViewOffset if animatedRef is not initialized by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7606
- Bump React Native to 0.80.0-rc.4 by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7614
- Remove redundant implementation of JSPropsUpdater by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/7615
- Remove HostInstancePaper by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/7611
- fix(Reanimated3): bump branch for nightly releases by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7609
- chore: Add missing CSS properties helper warnings by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7616
- fix: useScrollViewOffset not working after delayed ref initialization by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7612
- chore: Remove duplicate code from useAnimatedRef implementation by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7618
- feat: Rename useScrollViewOffset to useScrollOffset and allow any scrollable by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7597
- fix: useHandler updating on every render, even if dependencies didn't change by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7604
- Update NativeEventsManager.ts by @ovieokeh in https://github.com/software-mansion/react-native-reanimated/pull/7610
- docs: add Radon IDE banner to TOCItems by @kacperkapusciak in https://github.com/software-mansion/react-native-reanimated/pull/7631
- docs: fix Radon IDE banner by @kacperkapusciak in https://github.com/software-mansion/react-native-reanimated/pull/7634
- Correct test guide links by @brince0304 in https://github.com/software-mansion/react-native-reanimated/pull/7635
- Use
react_native_assertinstead ofassertby @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7645 - feat: remove all legacy arch code from libraries by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7640
- Remove integration with
react-native-v8andrnRuntimeargument fromWorkletRuntimeconstructor by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7650 - chore(deps): bump brace-expansion from 1.1.11 to 1.1.12 by @dependabot[bot] in https://github.com/software-mansion/react-native-reanimated/pull/7651
- Bump fabric-example to 0.80.0 by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7657
- Remove CollectionUtils.h by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7660
- chore: add rejest tests for makeShareableClone by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7598
- Refactor props allowlists (replace
addWhitelistedUIPropsandaddWhitelistedNativePropswithregisterJSProps) by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7642 - Fix sticky header by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7668
- docs: Add neccessary CodeBlocks in TabItems by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/7626
- Don't run exiting animations on modal removal by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/7667
- feat: Add CellRendererComponentStyle to Animated.FlatList by @gunnsteinnskula in https://github.com/software-mansion/react-native-reanimated/pull/6573
- fix: Not working window size dependent layout animations by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7681
- fix: Prevent uninitialized ScrollView warning from showing up on unmount by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7671
- Remove unused
enableLayoutAnimationsby @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/7685 - chore: Separate reanimated logger from worklets logger by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7648
- chore: Unit tests cleanup by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7683
- chore: update circular dependency check by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7687
- [Web] Do not call
getBoundingClientRecton every update by @m-bert in https://github.com/software-mansion/react-native-reanimated/pull/7678 - fix: Quick fix for getSnapshotBeforeUpdate error by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7693
- chore: remove
useWorkletCallbackhook by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7698 - chore: Remove JS props updating via C++ by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7684
- feat: Bump eslint to v9 by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7570
- feat: Eslint rules to ensure logger usage instead of console by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7691
- chore: cleanup after eslint bump by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7715
- docs: update aRef typing description to animatedRef in getRelativeCoords page by @fe-dudu in https://github.com/software-mansion/react-native-reanimated/pull/7725
- Remove warnings in
addWhitelistedUIPropsandaddWhitelistedNativePropsand mark as deprecated by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7682 - chore: Export reanimatedVersion variable instead of isReanimated3 by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7724
- chore: Optimize css keyframes registration in the keyframes registry by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7733
- chore: Migrate from ts-prune to knip by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7721
- chore: Change updateKeyframes to work with folly::dynamic instead of jsi::Value by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7734
- chore: move publicGlobals by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7735
- fix: add missing handling of
box-shadowprop by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7747 - fix: add missing dependency, update yarn.lock file for docs by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7753
- fix: add missing dependencies to worklet docs by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7756
- chore: Prepare routes to add svg prop animations examples by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7752
- fix: remove unnecessary process
box-shadowcall by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7748 - Prevent the frame loop from starting multiple times by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/7766
- Add feature flags by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/7697
- Fix reparenting by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/7732
- Fix zombie view when parent is moved by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/7768
- Remove
combineTransitionby @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/7771 - feat(Reanimated): add troubleshooting when Worklets are not installed by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7744
- chore(Reanimated): accept all pre-release versions of Worklets by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7774
- Rename
JSPropsExampletoCircularSliderExampleby @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7769 - Set compile options using
target_compile_reactnative_optionsfromreact-native-flags.cmakeby @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7776 - Update react-native-is-edge-to-edge to 1.2.1 by @zoontek in https://github.com/software-mansion/react-native-reanimated/pull/7729
- fix(Reanimated): Worklets version validation scripts failing in runtime by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7777
- Fix line too long in CMakeLists.txt by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7787
- fix: hwb color parsing on web by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7794
- Fix dynamic updates of layout animations by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/7788
- chore: add information about deprecated worklet functions by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7797
- fix: Fix linear easing x control point values calculation by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7802
- iOS ProMotion stutters by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/7624
- docs: correct exact -> shouldMatchAllProps by @alula in https://github.com/software-mansion/react-native-reanimated/pull/7806
- Update useScrollViewOffset.mdx by @HarwinBorger in https://github.com/software-mansion/react-native-reanimated/pull/7810
- fix: skipEntering being applied to all entering animations by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7812
- refactor: withSpring end conditions by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7803
- fix: update incorrect links in reanimated docs by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7811
- [Fabric LA] Add progress batching by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/7798
- [Fabric LA] Mark deleted nodes as DELETED by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/7818
- feat: add support for obtain
boxShadowprop from shadow node by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7804 - fix:
matchVersionfunction by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7821 - feat: upgrade withSpring animation defaults by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7670
- refactor: move spring stuff to spring dir by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7825
- Expand Migrating from Reanimated 3.x to 4.x by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7779
- Improve minimal React Native version error message by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7828
- fix: Accordion example crashing on web by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7832
- chore: Add support for RN 0.81 in packages (without example apps) by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7830
- chore: fix runtime tests by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/7743
- fix: precision errors in color interpolation keeping the animation to run forever by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7840
- Migrate all usages of
useAnimatedGestureHandlerin example app by @KeyJayY in https://github.com/software-mansion/react-native-reanimated/pull/7829 - Add
globalThisto_login the example app by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/7847 - chore: Update base branch for v3 nightly releases by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7848
- docs: Add 3.19 to compatibility table by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7850
- chore: Remove useAnimatedGestureHandler from libraries by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7853
- Add
DISABLE_COMMIT_PAUSING_MECHANISMfeature flag by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/7852 - fix: Content overflowing screen in the example app by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7857
- fix: Add backgroundColor to layout animations supported props by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7858
- Restore fast path with
synchronouslyUpdateViewOnUIThreadon Android by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7823 - Add remark about tintColor to docs, fix example in the example app by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7860
- Remove infobox about v4 beta from migration guide by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/7854
- Revert
useAnimatedStylechanges by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/7861 - fix: Shadow offsets and numeric colors not working in CSS on web by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7864
- Undo conditional skip of reanimated commits by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/7867
- release: Reanimated 4.0.0 by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/7870
New Contributors
- @n3ps made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/7533
- @ovieokeh made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/7610
- @brince0304 made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/7635
- @gunnsteinnskula made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/6573
- @fe-dudu made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/7725
- @alula made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/7806
- @HarwinBorger made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/7810
- @KeyJayY made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/7829
Full Changelog: https://github.com/software-mansion/react-native-reanimated/compare/4.0.0-beta.5...4.0.0
Release card