npm react-native-reanimated 4.8.0
Reanimated - 4.8.0

one hour ago

Reanimated 4.8 puts Shared Element Transitions in focus. They are now on by default, they move the shared view itself instead of a copy, and they get many fixes for native stacks, modals, sheets, back gestures and scroll views on iOS and Android. The release also adds shared values as Animated.Text children, backgroundImage gradients in CSS animations and transitions, and a lower per-frame cost of animations.

Key changes

  • Shared Element Transitions on by default: Set the ENABLE_SHARED_ELEMENT_TRANSITIONS static feature flag to false to turn them off. A transition now animates the shared view itself, so its content (for example a video player or an image) stays on screen.
    • New transition APIs: SharedTransition.fadeContent() fades the content of the moving view out and the content of the target in. SharedTransition.custom(), .progressAnimation() and .defaultTransitionType() from Reanimated 3 are back.
    • Transitions with navigation: Transitions follow their target through native stacks, modals, sheets, back gestures, tabs and scrolled lists. Android supports transitions between two views in the same React Native Modal.
  • Animated text: Animated.Text accepts shared values as children, also mixed with static text: <Animated.Text>{sv}%</Animated.Text>.
  • Styles and CSS: CSS animations and transitions animate backgroundImage gradients. borderCurve, writingDirection, verticalAlign and objectFit are now animatable. An invalid style value logs a warning in development instead of throwing.
  • Performance: Mappers run only when there is work, so an app with no running animations can go idle. Animations copy fewer props per frame, and layout animations cost less per commit.
  • Layout animations stability: Fixes for crashes and invisible entering views on Android, also under the mounting coordinator pull model.
  • Jest mocks: The mocks of useSharedValue, useDerivedValue, makeMutable and the scroll offset hooks now behave like the real hooks.
  • Compatibility: Reanimated 4.8 supports React Native 0.87–0.89 (0.86 is no longer supported) and pairs with Worklets 0.14.x.

Changelog

🎉 New features

  • Support Android shared element transitions between two views in the same React Native Modal. (#11260 by @pawicao)
  • Shared Element Transitions are now enabled by default. Set the ENABLE_SHARED_ELEMENT_TRANSITIONS static feature flag to false to turn them off. (#11146 by @pawicao)
  • Add fadeOut.end and fadeIn.duration options to SharedTransition.fadeContent(). (#11044 by @pawicao)
  • Play the entering animation of a fading direct child of the target view when a SharedTransition.fadeContent() transition lands. (#11035 by @pawicao)
  • Add SharedTransition.fadeContent(), which fades the children of a shared view out while it moves and fades the children of the target view in when it lands. (#11033 by @pawicao)
  • Add support for animating borderCurve, writingDirection, verticalAlign and objectFit styles. (#10904 by @tshmieldev)
  • Restore custom shared element transitions with SharedTransition.custom(), .progressAnimation() and .defaultTransitionType(), including the Reanimated 3 values and the transformMatrix output, interpolate every changed property in iOS progress transitions, and fix the interpolation of a transform matrix rotated by exactly 90 or -90 degrees around the Y axis. (#10885 by @bartlomiejbloniarz)
  • Show shared element transitions above iOS modals and hide the shared element in the snapshot of a closing iOS modal that holds a nested stack. (#10884 by @bartlomiejbloniarz)
  • Add support for shared values as children of Animated.Text, including mixed with static text like <Animated.Text>{sv}%</Animated.Text>. (#10713 by @tshmieldev)
  • Add backgroundImage support to CSS animations and CSS transitions, with interpolation of gradient colors, color stop positions, angle direction, and radial size and position on native and a CSS gradient string on web. (#10193 by @Titozzz)

🐛 Bug fixes

  • Fix a built-in shared element transition or a back gesture that did not follow its target when it interrupted the transition to the screen. (#11437 by @pawicao)
  • Fix a custom or timed progress shared element transition that did not follow the scroll of its target when the user went back before the transition to the screen ended. (#11436 by @pawicao)
  • Run the dirty mappers that follow a throwing mapper in the next frame instead of on the next input change. (#11423 by @tjzel)
  • Fix a React style change of a view that a shared element transition moves, for example its backgroundColor, which showed only after the view landed. (#11417 by @bartlomiejbloniarz)
  • Stop the settled-props polling when no registered view has updates left to sync or evict. (#11413 by @tjzel)
  • Fix the landing position of a shared element transition when a parent transform combines with a 3D transform. (#11389 by @pawicao)
  • Fix a popped stack screen on Android losing its content at the start of its exit animation during a shared element transition, which briefly showed only the shared views. (#11388 by @pawicao)
  • Fix a shared element transition on iOS that jumped when it ended while a native stack or a modal still moved its screen. (#11382 by @pawicao)
  • Run mappers only when a mapper starts, an input changes or a props flush is queued, so the app can go idle when nothing animates. (#11372 by @tjzel)
  • Fix a debug assertion crash when React re-creates a shared view whose transition clips it, for example when switching tabs before the transition ends. (#11371 by @bartlomiejbloniarz)
  • Resolve web styles through the public react-native-web StyleSheet export, so web works with react-native-web 0.21 and 0.22. (#11370 by @zoontek)
  • Start a shared element transition at the first frame of an iOS native stack back navigation instead of a few frames later. (#11369 by @bartlomiejbloniarz)
  • Release the iOS keyboard observer and its display link when the Reanimated module is invalidated on reload. (#11367 by @pawicao)
  • Fix a shared element transition that stayed in one place on the screen and landed late when the user scrolled the scroll view of its target during the transition. (#11365 by @pawicao)
  • Fix a shared element transition on iOS that flew off the screen and showed a mirrored view when the target screen opened as a modal with the flip animation. (#11364 by @pawicao)
  • Fix a shared element transition in a modal or a sheet on iOS that went to a wrong place and then jumped when it went back to its source before it ended. (#11363 by @pawicao)
  • Fix a frame without the shared view at the start of the first shared element transition of a surface on iOS, when the transition removes a screen. (#11331 by @pawicao)
  • Write only the views updated since the last flush when an event arrives during an Android draw pass, instead of every animating view. (#11325 by @tomekzaw)
  • Fixed worklet handlers for the onTransitionProgress and onGestureCancel screen events, such as useReanimatedTransitionProgress from react-native-screens, not running on iOS when shared element transitions are enabled. (#11322 by @pawicao)
  • On iOS, make a shared element transition land on a target that a native view between it and its React parent moves, for example the sheet of @swmansion/react-native-bottom-sheet. (#11305 by @pawicao)
  • Stop a moving shared view on Android from taking touches and accessibility focus during its transition, as on iOS. (#11304 by @pawicao)
  • The callback of a shared transition that does not move the view, for example between the screen and a Modal on Android, now gets false instead of true. (#11302 by @pawicao)
  • A shared view that mounts under an inactive SharedTransitionBoundary is hidden at mount only when the active boundary shows its tag or a transition moves it, so new rows under a sheet and the pages of a pager show. (#11300 by @pawicao)
  • Stop keeping the entering configuration of a component with its own nativeID, and warn in development that its entering animation does not run. (#11299 by @pawicao)
  • Reject withInitialValues, withTargetValues and rotate on SharedTransition in TypeScript, allow .custom() after other modifiers, and make the Jest mock of SharedTransition a class. (#11293 by @pawicao)
  • A shared view uses the default transition again when its sharedTransitionStyle prop is removed. (#11281 by @pawicao)
  • A built-in shared element transition follows the synchronous transforms of the parents of its target without the TRACK_SYNCHRONOUS_PROPS_IN_LAYOUT_ANIMATIONS flag. (#11280 by @pawicao)
  • Reduce the cost of commits that add or remove views on a screen with shared element transitions, and of commits during a transition. (#11277 by @pawicao)
  • Start built-in shared element transitions on iOS before the screen of the target is in its window, so that the view moves in the first frame of a navigation. (#11276 by @pawicao)
  • Keep the animation and the callback of the source when a commit moves the target of a running shared element transition. (#11275 by @pawicao)
  • Report the callback of a shared element transition once, when the view lands or the transition stops, so that a restart no longer reports false and a start that ends before its animation reports false. (#11274 by @pawicao)
  • Give the overlay of shared element transitions a tag that React Native never gives to a view, so it cannot share a tag with a view in a long session. (#11273 by @pawicao)
  • Start and end a shared element transition of a scroll view at its own frame, and keep the transforms of the parents of a shared view without size. (#11272 by @pawicao)
  • After a back gesture on iOS, fly to the view of the boundary that was active before the push, and show the hidden views of the screen that becomes active. (#11271 by @pawicao)
  • Render the children of SharedTransitionBoundary on web instead of throwing an error. (#11270 by @pawicao)
  • Start shared transitions for views inside LayoutAnimationConfig skipEntering and for views with their own nativeID. (#11269 by @pawicao)
  • Refresh shared transition registration when ReducedMotionConfig changes the mode. (#11258 by @pawicao)
  • Fix iOS shared element transitions to a new native screen that first moved toward the wrong position. (#11256 by @pawicao)
  • Fix a shared element transition that ended without moving when a second screen opened before the first one was on screen on iOS. (#11248 by @bartlomiejbloniarz)
  • Fix a shared element transition target with its own entering animation fading in again after the transition. (#11247 by @bartlomiejbloniarz)
  • Fix the start and the end of a shared element transition of a view in a scrolled inverted list. (#11246 by @bartlomiejbloniarz)
  • Fix a back gesture shared element transition flying to a hidden tab when the screen below holds a tab navigator on iOS. (#11245 by @bartlomiejbloniarz)
  • Fade a shared element from a transparent color using the RGB of the other view's color, so it no longer turns gray mid-flight. (#11244 by @bartlomiejbloniarz)
  • Accept a boolean in the overshootClamping modifier of layout animation builders, as documented. (#11243 by @bartlomiejbloniarz)
  • Stop warning that shared element transitions animate props that are not officially supported for layout animations. (#11242 by @bartlomiejbloniarz)
  • Fix janky scrolling and UI-thread animations on screens with many views that have a sharedTransitionTag. (#11241 by @bartlomiejbloniarz)
  • Throw an error for a sharedTransitionTag that is not a string, and keep configuring layout animations after such an error. (#11240 by @bartlomiejbloniarz)
  • Skip Android shared transitions into extra layout roots and keep refused target views visible. (#11230 by @pawicao)
  • Report shared element transition callbacks when native back navigation commits, cancels, or stops. (#11228 by @pawicao)
  • Skip shared element transitions when reduced motion applies to either view. (#11227 by @pawicao)
  • Follow animated ancestor transforms during built-in shared element transitions without restarting the animation. (#11221 by @pawicao)
  • Fixed shared element visibility after a cancelled native sheet dismissal. (#11219 by @pawicao)
  • Include native ancestor transforms in shared transition sheet geometry. (#11218 by @pawicao)
  • Move shared elements to their final position during an iOS swipe back when the uncovered screen gets its header after the swipe starts. (#11213 by @bartlomiejbloniarz)
  • Keep the newest animated opacity of a child that a shared element transition fades on Android when a UI-thread event writes it during a draw pass and ANDROID_SYNCHRONOUSLY_UPDATE_UI_PROPS is off. (#11176 by @pawicao)
  • In Debug builds, a JavaScript error thrown by a layout animation start or stop on the UI runtime is reported like other worklet errors and the animation ends at once, instead of the app terminating. (#11173 by @tjzel)
  • Keep the content of a shared element above a nested shared element during a shared element transition. (#11166 by @bartlomiejbloniarz)
  • Use the damping, mass and stiffness of a SharedTransition spring when it has no duration, instead of a 500 ms spring. (#11142 by @pawicao)
  • Fix nested shared views that started one header height too low when a shared element transition back from an iOS modal began. (#11141 by @pawicao)
  • Fix a shared element transition on Android that skipped its movement and jumped to its end when the JavaScript thread was busy after the navigation. (#11135 by @pawicao)
  • Fix a shared element transition on Android that moved toward a point one header height below the target when the target screen was new. (#11135 by @pawicao)
  • Keep a view that a shared element transition hides, or a target child whose entering animation waits, at opacity 0 when its animated opacity is written synchronously, and show the newest opacity of the hidden view when the transition ends. (#11134 by @pawicao)
  • Fix a shared transition that kept moving over a newly pushed screen without an active SharedTransitionBoundary. (#11131 by @bartlomiejbloniarz)
  • Fix a shared transition that kept moving over a newly pushed screen without its shared tag. (#11131 by @bartlomiejbloniarz)
  • Respect .duration(0) in Shared Element Transitions and other layout animation builders instead of using the default duration. (#11116 by @bartlomiejbloniarz)
  • Hide a shared transition target that React replaces during the transition, so that two copies do not show until the shared view lands. (#11115 by @bartlomiejbloniarz)
  • Fixed views that unmount while the animation backend is enabled leaking their animated and CSS props in the native registries. (#11114 by @bartlomiejbloniarz)
  • Fix an exiting animation that interrupts a running layout animation, such as the view's entering animation, jumping to its initial values instead of continuing from the view's current values (on web, for opacity). (#11093 by @roryabraham)
  • Fix predefined layout animations with withInitialValues using a 0.3 s duration on web instead of their default duration. (#11093 by @roryabraham)
  • Fix a crash on Android with ANDROID_SYNCHRONOUSLY_UPDATE_UI_PROPS when an animated style sets a prop such as opacity to null. (#11090 by @hirvesh)
  • When React removes the screen of a moving shared view, the view and its children now keep moving until the transition ends. (#11054 by @pawicao)
  • Shared element transitions keep the opacity and the clipping of the ancestors of the shared views. (#11045 by @bartlomiejbloniarz)
  • Shared Element Transitions show the source view at the end when React removes the target view during the transition. (#11042 by @pawicao)
  • Keep a nested shared element on screen until the shared transition of the view that holds it ends, and animate target style changes made while it waits. (#11039 by @pawicao)
  • Release the shared element transition configs of unmounted components, which were kept until the app closed. (#11037 by @bartlomiejbloniarz)
  • Fix a crash in layout animations when React Native's LayoutAnimation removes a view in the same frame in which React inserts a view into the same parent. (#11025 by @pawicao)
  • Fix the Jest mocks of makeMutable, useScrollOffset, useScrollViewOffset and useTimestamp to return full shared values. (#11024 by @tjzel)
  • Fix createAnimatedComponent throwing on mount for components whose ref is a useImperativeHandle handle. (#11023 by @bartlomiejbloniarz)
  • Preserve perspective when interpolating transform matrices in timing, spring, and shared element animations, and prevent non-finite values when a matrix has zero scale or is otherwise singular. (#11008 by @bartlomiejbloniarz)
  • Fix the Jest mocks of useSharedValue and useDerivedValue to implement addListener, removeListener and modify, so that libraries which subscribe to shared values no longer crash under Jest. (#11003 by @GrahamCampbell)
  • Stop animated style updates that arrive in the frames after a view unmounts from leaving stale entries in the props registry. (#10958 by @tjzel)
  • Fixed TypeScript errors in Reanimated sources when type-checked against React Native 0.86 and 0.87. (#10941 by @tjzel)
  • Fix the Jest mock of useSharedValue to return the same shared value on every render, like the real hook. (#10920 by @pawicao)
  • Fix the Jest mock of useSharedValue to call a lazy initializer function instead of storing the function as the value. (#10919 by @pawicao)
  • Fixed a crash when a view with an exiting animation is shown again while React Native's LayoutAnimation still animates its removal. (#10916 by @bartlomiejbloniarz)
  • Fix useScrollOffset unregistering and re-registering its scroll handler each time React re-attaches its animated ref to the same view, which an inline callback ref does on every render. (#10909 by @YevheniiKotyrlo)
  • Fix Mac Catalyst builds failing with ambiguous Rect and Point types by importing UIKit and AppKit mutually exclusively. (#10907 by @theeket)
  • Fix style processors accepting inherited object keys such as toString as valid fontWeight, transformOrigin and SVG vectorEffect values. (#10905 by @tshmieldev)
  • Avoid sending unchanged props during exiting animations on Android. (#10903 by @pawicao)
  • Start layout animations from the props that the view shows, including props merged on Android and synchronous updates. (#10903 by @pawicao)
  • Fix a crash in layout animations when React Native's LayoutAnimation deletes a view, such as a dismissed native stack modal, without removing its descendants. (#10902 by @piaskowyk)
  • Keep worklet event handlers attached when a wrapped component replaces its host view without an outer update. (#10901 by @pawicao)
  • Avoid replaying unchanged content props in Android shared transition updates and the initial hide for entering animations. (#10898 by @pawicao)
  • Fix CSS transitions on iOS with Core Animation that started from the color of an unmounted view when React Native reused its native view. (#10892 by @pawicao)
  • Shared Element Transitions keep the content of the moving view, for example its video player or image source, and preserve its animated props when the target changes. (#10891 by @pawicao)
  • Fix animated box shadows on Android rendering with a blur of at least 1, which blurred crisp shadows such as an inset ring and drew them through offscreen passes on every frame. (#10890 by @YevheniiKotyrlo)
  • Fix a crash when a shared element transition ends on its first frame, for example with Reduce Motion. (#10886 by @bartlomiejbloniarz)
  • Shared Element Transitions now animate the shared view itself instead of a copy, which removes an image flicker on iOS and keeps the children of the shared view on screen. (#10880 by @pawicao)
  • Fix a view revealed by a Suspense boundary (e.g. react-freeze) showing a stale animated value for a frame when FORCE_REACT_RENDER_FOR_SETTLED_ANIMATIONS is enabled. (#10874 by @piaskowyk)
  • Fix an Android crash (JNI DETECTED ERROR IN APPLICATION: obj == null in NativeProxy::getAnimationTimestamp) when a worklet still runs on the UI thread while the React host is torn down, for example on an expo-updates restart. (#10858 by @tomekzaw)
  • Fix useAnimatedRef retaining the unmounted component and its shadow node after the element unmounts. (#10851 by @knappam)
  • Fix the Jest mock of useDerivedValue so that isSharedValue recognizes the returned value and the mocked Animated.Text can render it. (#10847 by @tshmieldev)
  • Fix Easing.bezier returning wrong values around the middle of steep curves such as (1, 0, 0, 1) by using the closed-form solver of bezier-easing 3.2, which is precise to ~1e-14 and clamps inputs outside [0, 1]. (#10831 by @gre)
  • Resolve the DOM element of a component that exposes getAnimatableRef on web, so CSS animations and transitions, and entering, exiting and layout animations, apply to the animatable view instead of throwing or being skipped. (#10829 by @m-bert)
  • Move animated styles, inline props and CSS animations to the new host view when the view behind an animated component is replaced. (#10826 by @m-bert)
  • Re-resolve getAnimatableRef() when an animated component updates, so a wrapped component whose host view changes after mount keeps its events and view info on the current view. (#10825 by @m-bert)
  • Fix an Android startup crash when the system animation scale setting holds a value that is not a valid number, such as 1,0. (#10824 by @bartlomiejbloniarz)
  • Fix animated props being rolled back during React revision merge commits. (#10823 by @tshmieldev)
  • Fix the Jest resolver resolving web implementations for some modules of packages that peer-depend on Reanimated when installed with pnpm. (#10821 by @ryanlntn)
  • Fix settled boxShadow and backgroundImage values that reach React in the native format when both useAnimatedProps and useAnimatedStyle write them on one view. (#10819 by @pawicao)
  • Defer sync of settled props until pending updates reach the registry. (#10819 by @pawicao)
  • Fix layout animation frames that mounted on Android before the React commit they follow, which left a moved view with an entering animation at its old frame. (#10817 by @pawicao)
  • Fix entering animations that only transform the view, such as ZoomIn, leaving the view invisible on Android when React Native diffs props with enablePropsUpdateReconciliationAndroid. (#10812 by @bartlomiejbloniarz)
  • Fix views with an entering animation that stayed invisible on Android when the only frame of the animation, for example with Reduce Motion, arrived before the view was mounted. (#10811 by @bartlomiejbloniarz)
  • Fix a view with an entering animation that kept its mount-time frame on Android when its layout changed before the animation started. (#10808 by @pawicao)
  • Fix a reset of synchronously updated props to old values when a commit moves a view to another position in its parent, for example after a zIndex change of a sibling, on iOS and on Android with enableAccumulatedUpdatesInRawPropsAndroid. (#10800 by @pawicao)
  • Fix Unable to find viewState warnings on Android when a view that flattened while its child was exiting unflattens again before the exit ends. (#10795 by @bartlomiejbloniarz)
  • Fix Unable to find viewState warnings on Android when a layout animation updates a view in the frame before an exit animation in its subtree removes it. (#10794 by @bartlomiejbloniarz)
  • Fix an Android crash with [Reanimated] Unknown sensor type. in useAnimatedSensor on devices that deliver sensor events labeled with a sensor other than the registered one. (#10792 by @pawicao)
  • Fix a data race in the mount hook, which cleared a trait on the mounted root while React Native cloned it on the JS thread. (#10772 by @bartlomiejbloniarz)
  • Use a new sharedTransitionTag of a mounted view in Shared Element Transitions also when its sharedTransitionStyle does not change. (#10768 by @pawicao)
  • Keep Shared Element Transition targets visible on iOS when a native stack mounts with a modal screen already on top, for example after a navigation state restore. (#10764 by @pawicao)
  • Keep the animated props of a hidden view when a different surface, such as a LogBox or brownfield root, mounts. (#10762 by @pawicao)
  • Keep animated props until a running surface reports its first mount. (#10762 by @pawicao)
  • Fix an Android crash with react-native-screens before 4.27 when a native stack screen that holds a nested stack with header buttons is removed. (#10754 by @bartlomiejbloniarz)
  • Fix shared element transitions casting the props of a nested <Text> with a sharedTransitionTag on Android to view props. (#10741 by @bartlomiejbloniarz)
  • Fix settled values of props that useAnimatedProps returns only after mount being reset by the next React render. (#10736 by @pawicao)
  • Fix a native crash on Android caused by reading opacity from the props of a <Text> nested in another <Text> as if they were view props. (#10732 by @hirvesh)
  • Fix text losing its trailing word on Android after animating fontSize, letterSpacing or lineHeight with useAnimatedStyle or useAnimatedProps. (#10729 by @tshmieldev)
  • Fix withTiming extrapolating its easing when the first frame reports a timestamp earlier than the animation's startTime, which happens when the animation is started outside a frame flush. With an easing whose first control point is x1 = 0 the Newton-Raphson solver in Easing.bezier diverges just outside its domain, so the animated value could land orders of magnitude out of range for a single frame. (#10720 by @piaskowyk)
  • Flush completed exiting view removals in the legacy layout animations proxy when Android's mounting coordinator pull model is enabled. (#10704 by @piaskowyk)
  • Ignore invalid style values instead of throwing, which could crash the app from the UI runtime, and warn about them in development. An invalid filter now keeps the current filter instead of clearing it, and null resets a style property like in React Native instead of being rejected. (#10687 by @MatiPl01)
  • Fix exiting Layout Animations leaking their views on Android under the mounting coordinator pull model, where the structural cleanup of a finished animation was never flushed. (#10682 by @piaskowyk)
  • Fix a crash of the Layout Animations proxy (shadowIndex is out of range, Indices are wrong in Remove mutation, or memory corruption in release builds) when a view flattens in the same commit in which its parent unflattens. (#10676 by @bartlomiejbloniarz)
  • Report isAvailable from useAnimatedSensor in the first client render and in the render that changes sensorType, and report false during server rendering and hydration. (#10662 by @pawicao)
  • Fix an Android crash in performOperations when the React host is torn down while a CSS or layout animation runs in the background, for example on an expo-updates restart. (#10661 by @bartlomiejbloniarz)
  • Fix an animated view that showed an older value for one frame when a React commit mounted over a newer synchronous write, with ANDROID_SYNCHRONOUSLY_UPDATE_UI_PROPS or IOS_SYNCHRONOUSLY_UPDATE_UI_PROPS on. (#10631 by @pawicao)
  • Show a view hidden by a Shared Element Transition again when its sharedTransitionTag prop is removed or changed. (#10618 by @pawicao)
  • Keep views touchable when synchronous transforms move them outside a Shared Transition Boundary's frame. (#10610 by @bartlomiejbloniarz)
  • Restore the view's complete boxShadow, backgroundImage and transformOrigin value when a CSS animation of it ends, instead of only the elements the keyframes mentioned. (#10596 by @MatiPl01)
  • Treat none for transform and boxShadow as an explicit empty list, as CSS does, so transform: 'none' no longer throws and an empty transform list in a CSS transition is the identity transform instead of the current view value. (#10595 by @MatiPl01)
  • Fix a crash in useAnimatedKeyboard on iOS when the app delegate does not declare window, as in apps that use the UIScene lifecycle. (#10587 by @CAMOBAP)
  • Accept Groovy GString values for ndkVersion and ndkPath from the root Gradle project instead of ignoring them. (#10544 by @piaskowyk)
  • Fix web CSS animations stopping when an animation manager is reused before its pending stylesheet cleanup runs, which removed the keyframes of the active animation. (#10532 by @MatiPl01)
  • Deliver CSS animation and transition cancellation callbacks on web when their element unmounts, without pending cleanup retaining otherwise unreachable elements on browsers with weak reference support. (#10520 by @MatiPl01)
  • Skip synchronous Android prop updates for unmounted views to avoid throwing and logging mounting-layer exceptions on the UI thread. (#10435 by @ryan-saffer)
  • Restore entering animations when React reactivates a hidden Activity on iOS. (#10397 by @bartlomiejbloniarz)
  • Fix crash when a CSS animation or transition uses a PlatformColor or DynamicColorIOS value. (#10282 by @MatiPl01)
  • Stop redeclaring navigator.userAgent and navigator.vendor in the shipped types, which dropped their DOM readonly and conflicted with type packages that declare them. (#9010 by @YevheniiKotyrlo)

💡 Others

  • Fix a shared element transition that a new screen continues before it lands, which showed the style of the removed screen, for example its borderRadius, while it moved to the new screen. (#11384 by @pawicao)
  • Fix a custom or timed progress shared element transition that stopped at the old place of its target and then jumped when the user scrolled the scroll view of the target during the transition. (#11383 by @pawicao)
  • Fix a shared element transition that restarted from a hidden view when a new transition took over a transition that waited to land. (#11382 by @pawicao)
  • Fix a modal on iOS that showed the end of a running shared element transition when it closed, instead of the moving view where it was on screen. (#11381 by @pawicao)
  • Reduced the JS thread cost of the settled props sync, which no longer copies the tags of all animated views every 500 ms. (#11343 by @pawicao)
  • Remove an unreachable branch for a moved view with a queued animation in the layout animations proxy, and assert the invariant that makes it unreachable. (#11339 by @pawicao)
  • Stop the registration of the progress animation of a shared element transition on Android, where no code uses it. (#11338 by @pawicao)
  • Reduce the JavaScript thread work of each frame of a shared element transition on Android. (#11337 by @pawicao)
  • Reduce the time per frame of shared element transitions and of exiting animations on Android: each frame now makes one copy of the props of the view, not two. (#11333 by @pawicao)
  • Keep the view before an update only where a layout animation needs it. (#11332 by @pawicao)
  • Stop finalizing a view a second time after writing synchronous props on iOS, which React Native already does. (#11329 by @tomekzaw)
  • Look up the property names of prop updates once per frame instead of once per animated view. (#11328 by @tomekzaw)
  • Round text metrics on the converted props instead of the JS updates object, so animated props are no longer copied every frame. (#11326 by @tomekzaw)
  • Skip the shared element transition bookkeeping of a commit when no view has a shared tag and no boundary is mounted. (#11323 by @pawicao)
  • Added support for React Native 0.89 and dropped support for React Native 0.86. (#11298 by @pawicao)
  • Reduce the time per frame of a shared element transition with fadeContent() on a view with many children. (#11278 by @pawicao)
  • Keep finished shared transition runs until the end of the pull instead of erasing them during it. (#11209 by @bartlomiejbloniarz)
  • Track the placement and the React presence of a shared element transition carrier in two explicit states that change only through named operations. (#11179 by @pawicao)
  • Keep the runs of shared element transitions in one registry by carrier, with an explicit lifecycle and driver and an index of active runs by shared tag. (#11178 by @pawicao)
  • Derive the landing of a shared element transition from the layout animation phase of its carrier. (#11177 by @pawicao)
  • Read only an owned copy of the opacity prop from the updates registry when a shared element transition fades content, and check the lock order of the layout animations proxy in debug builds. (#11175 by @pawicao)
  • Simplify the internal state of shared element transitions and stop copying the synchronous props batch on every synchronous write. (#11133 by @bartlomiejbloniarz)
  • Fix a shared transition that loses its move when its view is a target child whose entering animation waits for a fadeContent() landing. (#11122 by @bartlomiejbloniarz)
  • Animate a React Native modal that is removed during a shared element transition on iOS with React Native's own snapshot. (#11112 by @bartlomiejbloniarz)
  • Add cutting a docs version after each minor release to the release guide. (#11108 by @tjzel)
  • Fix an Android crash when a shared transition moves its source out of a screen that React Native Screens is removing. (#11101 by @bartlomiejbloniarz)
  • Jest tests in __tests__ now resolve the same web-only modules as the library code, so a spy on such a module reaches the instance the library uses. (#11099 by @tomekzaw)
  • Remove the leftover cpplint suppression comments from the C++ sources. (#11080 by @tshmieldev)
  • Select the UIKit or AppKit reduced motion implementation with TARGET_OS_OSX instead of __has_include. (#11064 by @tomekzaw)
  • Reduced the per-frame CPU cost of animations by copying fewer props on the UI thread. (#11057 by @tomekzaw)
  • Let ccache share the Android C++ compile results that use the precompiled header between checkouts at different paths. (#11047 by @bartlomiejbloniarz)
  • Add a docstring to Animated.Text that warns against reading the value of a shared value passed as a child. (#11046 by @tshmieldev)
  • Skip searching the whole view tree for the active shared transition boundary on commits that can't change it. (#10999 by @tomekzaw)
  • Track fewer views on every commit that layout animations observe. (#10998 by @tomekzaw)
  • Skip looking up layout animations for a view update when no view has one. (#10997 by @tomekzaw)
  • Copy fewer view mutations while layout animations track every commit. (#10995 by @tomekzaw)
  • Copy fewer prop values on Android while layout animations track every commit. (#10994 by @tomekzaw)
  • Skip flushing layout animation operations when none are queued. (#10993 by @tomekzaw)
  • Add a Jest web test that runs the browser sensor path of useAnimatedSensor without mocks. (#10989 by @tjzel)
  • Bump the React Native dev dependencies to 0.88.0. (#10952 by @pawicao)
  • Rewrite the Android shared transition boundary view and its manager in Kotlin. (#10865 by @tjzel)
  • Configure the Android library with LibraryExtension instead of the deprecated android {} Gradle DSL. (#10865 by @tjzel)
  • Replace deprecated React Native, Android and iOS APIs in native code. (#10865 by @tjzel)
  • Remove the unused ReanimatedPackage.getReactInstanceManager method on Android, which depended on the deprecated ReactInstanceManager. (#10865 by @tjzel)
  • Fail the example app build on use of deprecated APIs in native code. (#10864 by @tjzel)
  • Store pending shadow tree props as folly::dynamic instead of RawProps. (#10849 by @tshmieldev)
  • Let runtime tests read the props that mounted views show on screen during Core Animation animations when RUNTIME_TEST_FLAG is enabled. (#10843 by @bartlomiejbloniarz)
  • Let runtime tests read the background color of mounted views when RUNTIME_TEST_FLAG is enabled. (#10842 by @bartlomiejbloniarz)
  • Remove the Shared Element Transition code from the web and Windows AnimatedComponent, because it had no effect there. (#10777 by @pawicao)
  • Use setSerializableMapping and hasSerializableMapping from Worklets instead of serializableMappingCache. (#10758 by @tshmieldev)
  • Let runtime tests read the frame and opacity of mounted views when RUNTIME_TEST_FLAG is enabled. (#10739 by @bartlomiejbloniarz)
  • Bump the example apps and dev dependencies to React Native 0.88.0-rc.3. (#10738 by @pawicao)
  • Bump the example apps and dev dependencies to React Native 0.88.0-rc.4. (#10738 by @pawicao)
  • Initialize the layout animations light tree root from the committed root shadow node. (#10737 by @bartlomiejbloniarz)
  • Reduce the time that the UI thread waits while a React commit applies the animated values to the shadow tree. (#10707 by @pawicao)
  • Reduce the time that Reanimated holds the registry lock while it collects the animated values for a commit. (#10706 by @pawicao)
  • Stop importing react-native-worklets at runtime in the web implementation. (#10697 by @tjzel)
  • Start and stop mappers in requestAnimationFrame on web instead of scheduleOnUI. (#10696 by @tjzel)
  • Run frame callbacks directly on the web instead of through a separate UI registry. (#10695 by @tjzel)
  • Register event, keyboard and sensor handlers without createSerializable on web. (#10694 by @tjzel)
  • Create the useAnimatedStyle state without makeShareable on web. (#10693 by @tjzel)
  • Create the useHandler context without makeShareable on web. (#10692 by @tjzel)
  • Register the style updater flag for the UI runtime only on native. (#10691 by @tjzel)
  • Set the animation timestamp global in the Reanimated web initializer. (#10690 by @tjzel)
  • Remove the worklets version check from the web implementation in development builds. (#10689 by @tjzel)
  • Simplify the light tree based Layout Animations proxy so that every view React deletes waits for one decision of how it exits, and name the states of a light node after what they mean. (#10677 by @bartlomiejbloniarz)
  • Fix broken links in code comments. (#10670 by @tjzel)
  • Type the value of useAnimatedSensor from its sensor type with a generic signature, so a sensorType whose value is known only at runtime is accepted. (#10662 by @pawicao)
  • Bump the example apps and dev dependencies to React Native 0.88.0-rc.2 and move the iOS example app to the UIScene lifecycle. (#10650 by @pawicao)
  • Rename the DEAD exiting state of the light tree based Layout Animations proxy to COMPLETED. (#10629 by @bartlomiejbloniarz)
  • Replace ESLint with oxlint for JavaScript and TypeScript linting. (#10584 by @tshmieldev)

Full comparison: 4.7.2...4.8.0

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

NewReleases is sending notifications on new releases.