Key changes
- Shared Element Transition on the New Architecture (feature flag) by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/7466
- Sync animated styles back to React (force render for settled animations) by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8529
- Reduce
libreanimate.sosize by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/8259 - feat: 3D and 2D CSS transform matrix integration by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8195
- feat: react-native-strict-api types supports with backwards compatibility by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8136
- feat: Add support for
filterproperty by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8451 - feat: Add support for filter property to CSS by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8483
- feat: Add support for static PlatformColor by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8341
- feat: add support for DynamicColorIOS by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8221
- feat: Add working macos-example@0.79 by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8248
- feat: Enable animating transform string by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8585
- feat: Add context to style processors by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8689
Other changes
React Native Compatibility & Dependency Updates
- chore: Bump RN to 0.82 stable by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8351
- chore: bump RN to 0.82.rc-4 by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8299
- fix: Add React Native 0.82 compatibility support by @joshkeldam in https://github.com/software-mansion/react-native-reanimated/pull/8346
- Use
hermesvminstead oflibhermeson RN 0.82+ by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8192 - Compatibility with new Hermes by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/8268
- Drop compatibility for React Native 0.78 by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8411
- Remove CMake conditionals and unused shared libraries from outdated React Native versions by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8193
- chore: Bump RN in example apps to latest versions by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8197
- chore: Bump react-native-pager-view to v7 by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8278
- chore: use automatic jsx runtime and bump react-native-builder-bob by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7451
- chore: use same versions of dependencies in monorepo where applicable by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/7702
CSS & Transform Improvements
- fix: Invalid default CSS transforms value by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8562
- fix: Invalid default CSS transforms value by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8574
- fix: Correct CSS transform perspective interpolation for values close to 0 by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8649
- fix: CSS transform crashes caused by incorrectly thrown error by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8546
- fix: CSS animation early finish for fractional
animationIterationCountby @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8572 - fix: Use correct
transformOriginprocessor for native CSS style processing by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8623 - chore: Remove unnecessary checks from css value constructors by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8185
- chore: Reduce CSS ValueInterpolator templating by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8198
- chore: Remove double templating in css variant by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8229
- chore: Some CSS code improvements by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8249
- chore: Move CSSValue construction from CSSValueVariant to interpolator factory by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8255
- chore: Move interpolator configs to a single implementation file by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8258
- chore: Move some CSS props to the common dir by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8392
- chore: Move transforms and matrix implementations from headers to cpp files by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8262
- chore: Simplify and optimize
interpolateimplementation by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8397 - chore: Move SVG color to a separate SVGBrush struct by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8402
- chore: Move common parts of transforms and filters style interpolator to the base class by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8590
- chore: More detailed invalid CSS keyframes object error message by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8618
- chore: Move CSS SVG opacity interpolator to common interpolators by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8652
Color & Style Processing
- fix: Implement correct CSS boxShadow interpolation by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8177
- fix: Implement correct transparent color interpolation by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8398
- fix: Use correct color processor in CSS by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8393
- fix: Transparent color crashes on Android by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8688
- fix: Move
DynamicColorIOShandling logic to theprocessColorfunction by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8617 - fix: Move
PlatformColorprocessing to theprocessColorby @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8670 - fix: Add check for nullable in DynamicColorIOS by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8544
- fix: Do not process PlatformColor by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8553
- fix: Support for animating only one of boxShadow properties on Android by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8350
- fix: DynamicColorIOS bug by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8279
- fix: Incorrect transparent color behavior in CSS transitions by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8542
- fix: Crash when 'none' string is passed for the SVG
fillproperty by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8672 - fix: Change CSS allowDiscrete prop to allow-discrete, revert non-CSS prop changes in docs by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8349
- Fix synchronous props for
PlatformColoron Android by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8687 - chore: Move SVG color to a separate SVGBrush struct by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8402
- chore: Unify
processColorfunction implementation by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8433
Web-Specific Fixes
- fix(Reanimated): parsing layout animations on web by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8404
- fix: web types by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8401
- fix: Animated style and switch not working in Freeze Example on web by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8467
- fix: Web example app hot-reload not working on sources change by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8469
- fix: Web CSS animation restarting on navigation between screens by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8472
- fix: CSS transition immediate finished state in web example by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8498
- fix: Views disappearing on web when exiting layout animation is used with StrictMode by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8567
- fix: Incorrect detach call in web
CSSAnimationsManagerby @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8573 - fix: Web crashes if there is no DOM element and other little issues by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8581
- [Web LA] Ensure callbacks are called when
ReducedMotionis on by @m-bert in https://github.com/software-mansion/react-native-reanimated/pull/8208 - fix: Web example runtime crash caused by invalid babel config by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8417
Animation & Layout Animation Fixes
- fix: Animated styles not registered after unfreeze by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8325
- Fix inline props processing by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8447
- fix: Animated style and switch not working in Freeze Example on web by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8467
- Fix synchronous props updates on iOS below RN 0.81 by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8427
- Restore fast path with
synchronouslyUpdateViewOnUIThreadon iOS by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8367 - Skip flushing layout animation requests when handling events on Android by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8459
- [LA] Add check if view is mounted on Android by @bartlomiejbloniarz in https://github.com/software-mansion/react-native-reanimated/pull/8083
Performance & Build Optimizations
- Speedup reanimated build-time by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/8226
- Enable executeSync not only in Bundle Mode by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/8214
- Add clang tidy performance checks by @wisniewskij in https://github.com/software-mansion/react-native-reanimated/pull/8429
Interpolator & Helper Refactoring
- chore: Pass interpolator config via helper struct by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8165
- chore: Return unique_ptr from TransformOperationInterpolator interpolate method by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8342
- chore: Move SVG color to a separate SVGBrush struct by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8402
- chore: Relocate style processors to the common dir by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8391
Error Handling & Logging
- fix: Initialize logger before all other things by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8227
- fix: Don't pass uninitialized ref to dispatchCommand, add warnings by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8327
- fix: Replace old link to worklet error "Tried to synchrounously call a non worklet function..." by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8319
- fix: Make obtaining logger config safer by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8527
- fix(Reanimated): vague exceptions on missing microtaskQueueFinalizers array by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8530
- fix(Reanimated): warn only once when exiting animation overwrites styles by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8645
- chore(Reanimated): Add warning when animated styles are passed to non-animated component. by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8662
- fix(Reanimated): false positive animated style in non-animated component error in InlinePropManager by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8677
Testing & Test Infrastructure
- chore: Web style processors and utils tests by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8603
- chore: Add more common processors and utils tests by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8602
- chore: Tests for CSS keyframe normalization helpers by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8620
- chore: Web CSS transition properties normalization tests by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8635
- Fix BaseAnimationMock by @alexphl in https://github.com/software-mansion/react-native-reanimated/pull/8591
- chore: Align all styles in internal tests by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8282
Bug Fixes & Misc
- fix: Android validation CI failure by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8203
- fix: Incorrect css svg feature flag name in example app configs by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8260
- fix: no Babel plugin support by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8241
- fix: BottomSheet example crash by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8416
- Fix "folly::toJson: JSON object value was an INF" by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/6773
- Remove -1234567 branch in
measureby @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8413 - fix: SVG Polygon not visible in third party components example by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8418
- fix(Reanimated): useAnimatedRef breaking on SectionList by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8301
- Add a missing include in Quaternion.cpp by @pawicao in https://github.com/software-mansion/react-native-reanimated/pull/8423
- Fix unused variable
statuson iOS by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8518 - Fix argument name in
ReanimatedMountHookby @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8526 - fix: CSS template compilation by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8607
- fix: Revert #8607 and fix FilterOperationBase template instantiation by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8613
- fix: Clang tidy errors by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8621
- fix(Reanimated): Add support for precision to filter processor regex by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8643
- fix: Add check for nullable in DynamicColorIOS by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8544
- fix: Fix for multiple surfaces by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8554
- fix: Safe merge for user config in Spring Animation by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8533
Codebase Maintenance & Refactoring
- chore: Remove duplicate ValueProcessor type by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8316
- chore: Make ValueProcessor inputs non-mutable by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8317
- chore: Remove
ReanimatedErrorandWorkletsErrorfrom global types by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8435 - chore: Remove missing animationName CSS prop warning by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8448
- chore: post Reanimated and Worklets updates by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8289
- chore: silence Reanimated Plugin warning by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8267
- chore: don't install Bundle Mode patches by default by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8290
- chore: use new Worklet APIs in repo by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8471
- chore: replace use-strict check with ESLint rule by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8382
- chore: dedupe deps by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8383
- chore: use bundler for TS resolutions by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8384
- chore: patch RNGP to enable Android Studio Clean Project by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8683
- chore: actionable compatibility exceptions by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8541
- chore: prevent input hijacking in RuntimeTests runner by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8559
- chore: fix missing overrides by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8558
- chore: Mock of SVG to test it with Reanimated by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8387
- chore: Export correct createAnimatedComponent by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8395
- chore: Add question about feature flags to issue form by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8524
- chore: Add workflow for checking Ruby and CocoaPods versions by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8368
- chore: deprecate
useAnimatedKeyboardby @kirillzyusko in https://github.com/software-mansion/react-native-reanimated/pull/8626 - chore: add
yarn installcommand to lint docs step by @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/8160
Hooks & Integration
- Automatically workletize callbacks from Gesture Handler hooks api by @j-piasecki in https://github.com/software-mansion/react-native-reanimated/pull/8599
- fix: SharedValue returned by useAnimatedKeyboard not receiving keyboard position updates by @MatiPl01 in https://github.com/software-mansion/react-native-reanimated/pull/8571
- Add
getDynamicFeatureFlagfunction by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8548 - Ignore deep imports warning in common-app by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8539
CI/CD & Publishing
- chore: fix pre-commit clang-format by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8512
- chore: fix Bundle Mode CI by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8504
- chore: Fix Reanimated Static Check Nightly CI by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8515
- fix: next CI cache issue by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8405
- fix(Reanimated): flaky RN$Bridgeless assertion by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8406
- Use commit hook only for React commits by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8365
- Configure OIDC in nightly publish action by @kmagiera in https://github.com/software-mansion/react-native-reanimated/pull/8653
- Configure OIDC in nightly publish action for worklets by @kmagiera in https://github.com/software-mansion/react-native-reanimated/pull/8654
- Try to fix OIDC publishing by @kmagiera in https://github.com/software-mansion/react-native-reanimated/pull/8658
- Bump setup-node action and node versions for worklets publishing by @kmagiera in https://github.com/software-mansion/react-native-reanimated/pull/8660
- chore: Publish nightly only when there were changes on branch by @patrycjakalinska in https://github.com/software-mansion/react-native-reanimated/pull/8657
Compiler & Code Quality
- Add new compilation flags by @wisniewskij in https://github.com/software-mansion/react-native-reanimated/pull/8408
- Revert worklets visibility changes (from #8408) by @wisniewskij in https://github.com/software-mansion/react-native-reanimated/pull/8608
- Fix formatting by @wisniewskij in https://github.com/software-mansion/react-native-reanimated/pull/8439
- Remove 'Fix formatting (#8439)' from blame by @wisniewskij in https://github.com/software-mansion/react-native-reanimated/pull/8466
New Contributors
- @joshkeldam made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8346
- @Elham13 made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8347
- @pawicao made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8415
- @wisniewskij made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8439
- @alexphl made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8591
- @flexbox made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8692
Full Changelog: https://github.com/software-mansion/react-native-reanimated/compare/4.1.5...4.2.0