github software-mansion/react-native-reanimated 4.4.0
Reanimated - 4.4.0

5 hours ago

Key changes

iOS CSS Core Animation

Reanimated 4.4.0 introduces a new platform-backed CSS animation engine on iOS that runs animations
directly on Core Animation layers instead of going through the JS-driven update loop. It is hidden
behind the IOS_CSS_CORE_ANIMATION static feature flag.

  • feat: Wire CSSPlatformTransition with iOS platform implementation by @MatiPl01 in #9325
  • chore: Hide platform animations behind a feature flag by @MatiPl01 in #9493

Animation Backend

A new Animation Backend has been integrated behind a feature flag, which will help greatly with the flow of updating the Shadow Tree in animations.

New useTimestamp hook

A new useTimestamp hook exposes the current frame timestamp as a Shared Value that updates every
frame with the time elapsed since the first frame, with an isActive flag to pause and resume updates.

Precompiled headers on Android

Reanimated's native build on Android now uses precompiled headers (ReanimatedPCH.h), significantly
reducing C++ compile times for both fresh and incremental builds.

Other changes

  • fix(Reanimated): Spring jitter by @piaskowyk in #9463
  • feat: emit ESM package json by @tjzel in #9481
  • Add support for placeholderTextColor in synchronous props by @tomekzaw in #9409
  • Add support for shadowColor in synchronous props by @tomekzaw in #9411
  • Add support for shadowOffset in synchronous props by @tomekzaw in #9412
  • Add support for outlineColor, outlineOffset and outlineWidth in synchronous props by @tomekzaw in #9417
  • Add support for borderBlockColor, borderBlockStartColor and borderBlockEndColor in synchronous props by @tomekzaw in #9418
  • Unify synchronous props logic between platforms by @tomekzaw in #9381
  • Preallocate and reuse synchronous props buffers on Android by @tomekzaw in #9425
  • fix(Reanimated): laggy LA outside of Animation Backend by @tjzel in #9431
  • feat: CSSPlatformAnimation abstraction by @MatiPl01 in #9278
  • feat: CSSPlatformTransition abstraction by @MatiPl01 in #9324
  • chore: Rename EXPERIMENTAL_PLATFORM_CSS_ANIMATIONS to IOS_CSS_CORE_ANIMATION by @MatiPl01 in #9506
  • fix(Reanimated): RCTModernEventEmmitter for older RN by @tjzel in #9181
  • chore(Reanimated): post release 4.3.0 by @tjzel in #9182
  • Add check for conflicting feature flags by @tomekzaw in #9174
  • Store ShadowNodeFamily instead of ShadowNode in UpdatesRegistry by @tomekzaw in #9156
  • Store ShadowNodeFamily::Shared instead of ShadowNodeFamily * in PropsMap and ChildrenMap by @tomekzaw in #9184
  • Remove useInterpolateConfig function and InterpolateConfig and ColorSpace types by @tomekzaw in #9150
  • Bump React Native to 0.85.0-rc.6 by @tomekzaw in #9193
  • Update doNotStrip to keepDebugSymbols by @wisniewskij in #8636
  • Migrated packages/react-native-reanimated java->kotlin by @tshmieldev in #9163
  • removed JSCallInvokerResolver.kt by @tshmieldev in #9198
  • chore: Bump RN to 0.85.0 stable by @MatiPl01 in #9233
  • fix: animation cancellation race condition by @Nodonisko in #9235
  • fix: animation cancellation race condition missing code by @tjzel in #9242
  • Change UI runtime slow animations invocation pattern by @tshmieldev in #9205
  • chore: Remove no longer used StaticPropsRegistry methods and props by @MatiPl01 in #9226
  • chore: Remove unused css code by @MatiPl01 in #9227
  • fix: Incorrect CSS props reverting on CSS transition detach by @MatiPl01 in #9220
  • feat: Strict TS types in LA withInitialValues method by @MatiPl01 in #9232
  • fix: Freeze example crash and different timings by @MatiPl01 in #9247
  • feat: Add support for separate transform props in LA initial values config by @MatiPl01 in #9237
  • refactor: decouple raf and events by @tjzel in #9244
  • feat(Reanimated): Export NativeEventsManager by @j-piasecki in #8655
  • feat: adds withTargetValues modifier to default layout animations by @PiotrWszolek in #8848
  • chore(Reanimated): jest tests for useFrameCallback by @tjzel in #9255
  • docs: Remove withInitialValues for layout transitions by @MatiPl01 in #9258
  • fix: Remove withInitialValues and withTargetValues from layout transitions by @MatiPl01 in #9259
  • feat: Update initial value of shared value by @pranko17 in #8782
  • chore(Reanimated): add lint step to disallow worklets includes by @tjzel in #9262
  • docs: Add new types of initial values in layout animation configs by @MatiPl01 in #9257
  • docs: Add withTargetValues to Layout Animations docs by @PiotrWszolek in #9168
  • fix: Fix handling falsy values in jestUtils getCurrentStyle by @edkimmel in #7494
  • fix: Unistyles flattening regression in 4.3.0 by @MatiPl01 in #9284
  • fix(Reanimated): not flushing updates without mapper runs by @tjzel in #9270
  • fix(Reanimated): useScrollOffset on renderScrollComponent by @tjzel in #9286
  • chore: Extract CSS loop to the separate OperationsLoop class by @MatiPl01 in #9285
  • Chore(Reanimated): reanimatedmoduleproxy refactor by @tshmieldev in #9342
  • fix(Reanimated): registries race conditions by @tjzel in #9323
  • Remove checks for new arch enabled by @tomekzaw in #9311
  • feat: Add short-circuit for scheduleOnUI called from the UI thread on Android by @MatiPl01 in #9343
  • feat: Add LoopOperation interface and operation-based scheduling primitives by @MatiPl01 in #9346
  • docs: remove outdated "Debugging worklets" guide by @tomekzaw in #9355
  • Use REACT_NATIVE_VERSION_MINOR provided by React Native instead of custom definition by @tomekzaw in #8412
  • fix: Attempt to fix EXC_BAD_ACCESS in ReanimatedModuleProxy::performOperations during AnimationFrameBatchinator::flush by @MatiPl01 in #9308
  • Remove legacy CDP debugger setup via HermesExecutorRuntimeAdapter by @tomekzaw in #9356
  • chore(Reanimated): remove maybeRequestRender dead code by @tjzel in #9357
  • Remove linking ReactAndroid::hermestooling prefab by @tomekzaw in #9360
  • fix(Reanimated): remove unnecessary locks by @tjzel in #9361
  • Remove unused MessageQueueThread by @tomekzaw in #9329
  • Remove RuntimeInitialization.md by @tomekzaw in #9362
  • docs: add versions for Expo SDK 55 and 56 by @tomekzaw in #9341
  • Remove special handling of react-native-tvos in podspecs by @tomekzaw in #9365
  • Remove JSC runtime support by @tomekzaw in #9364
  • Extract synchronous props serialization and parsing logic to separate files by @tomekzaw in #9368
  • Improve error handling in synchronous props logic on Android by @tomekzaw in #9379
  • fix: ReJest beforeEach blocks by @tjzel in #9363
  • Remove _IS_FABRIC variable by @tomekzaw in #9375
  • Add missing @DoNotStrip annotations by @tomekzaw in #9372
  • chore: add include Matcher and cleanup runtime tests by @tjzel in #9384
  • fix: Dedupe native keyframes registration across same-content rules by @MatiPl01 in #9389
  • refactor: Divide CSS Transition settings form diffs by @wisniewskij in #9340
  • Move SynchronousPropsBufferSerializer into #ifdef ANDROID by @tomekzaw in #9395
  • Refactor synchronous props commands definition and lookup by @tomekzaw in #9396
  • fix: Conflict with global expo type overrides by @MatiPl01 in #9394
  • Use pushInt and pushDouble helper functions in synchronous props serializer by @tomekzaw in #9397
  • chore: Simplify AnimatedStyle types by @MatiPl01 in #9400
  • fix: runtime tests wrongly mocking console on UI Runtime by @tjzel in #9405
  • chore: fix runtime tests formatting by @tjzel in #9404
  • fix: Opaque colors support in SVG CSS animations by @MatiPl01 in #9421
  • fix(Reanimated): retain iOS module proxy explicitly by @bartlomiejbloniarz in #9414
  • fix: runtime tests ANR when initializing describe blocks by @tjzel in #9413
  • fix: CSS animatedProps in SVG not passed in initial render by @MatiPl01 in #9419
  • fix: animatedProps should take precedence over inline props by @MatiPl01 in #9422
  • Replace std::stof with std::stod in synchronous props logic by @tomekzaw in #9424
  • Synchronous props handling cleanup by @tomekzaw in #9423
  • fix: add mutex lock in LayoutAnimationsManager::transferSharedConfig by @tomekzaw in #9429
  • chore(Reanimated): remove onRender dead code by @tjzel in #9430
  • docs: update supported synchronous props in "Feature flags" page by @tomekzaw in #9439
  • Add constexpr in feature flag check in synchronous props buffer preallocation on Android by @tomekzaw in #9440
  • Remove bridgeless check on iOS by @tomekzaw in #9459
  • fix: forward ref through Animated.FlatList under React 19 by @elliottkember in #9466
  • feat: OperationsLoop for simpler css animations and transitions updates by @MatiPl01 in #9248
  • chore: Cleaner CSS animation/transition lifecycle by @MatiPl01 in #9487
  • feat: Convert css easing configs to the intermediate config format instead of function by @MatiPl01 in #9273
  • fix: Centralize the usage of locks, fix potential race conditions by @MatiPl01 in #9489
  • feat: CSS AnimationStyleInterpolatorFactory allowing interpolated properties subset modification by @MatiPl01 in #9276
  • feat: CSSLoopAnimation abstraction for reanimated-loop updated CSS animation properties by @MatiPl01 in #9277
  • feat: CSSLoopTransition abstraction for reanimated-loop updated CSS animation properties by @MatiPl01 in #9316
  • chore: CSSTransition implementation cleanup by @MatiPl01 in #9320
  • chore: bump RN compatibility to 0.86 by @tjzel in #9496
  • fix: Add missing locks by @MatiPl01 in #9495
  • fix: runtime tests in release by @tjzel in #9500
  • chore: Remove EXPERIMENTAL_CSS_ANIMATIONS_FOR_SVG_COMPONENTS feature flag by @MatiPl01 in #9501
  • chore: Add missing EXPERIMENTAL_PLATFORM_CSS_ANIMATIONS flag in a few places by @MatiPl01 in #9502
  • fix: Fix build issues after #9325 by @MatiPl01 in #9504
  • fix: Stop CA animations from leaking onto recycled layers by @MatiPl01 in #9508
  • fix: Convert CSS Core Animation beginTime to layer-local clock by @MatiPl01 in #9507
  • chore: Reintroduce EXPERIMENTAL_CSS_ANIMATIONS_FOR_SVG_COMPONENTS with default true by @MatiPl01 in #9510
  • docs: Add IOS_CSS_CORE_ANIMATION feature flag to docs by @MatiPl01 in #9505
  • release(Reanimated): 4.4.0 by @tjzel in #9514

New Contributors

Full Changelog: 4.3.1...4.4.0

Don't miss a new react-native-reanimated release

NewReleases is sending notifications on new releases.