WhoBuilt

React Native Animations in 2023 and Beyond

Sep 25, 2023· 22 min· 4.2K views·Watch on YouTube

Speaker

Catalin Miron, mobile lead at ElevenLabs and creator of Animate React Native, presents at React Native EU 2023 about Reanimated’s capabilities and gaps, with examples of shared transitions and two open-source components.

Reanimated 3 updates

Miron says Reanimated 3 remains compatible with animations written for Reanimated 2, while dropping the legacy Reanimated 1 API and adding Fabric support. Version 3.4 brought progress-based shared element transitions, border-radius interpolation, reduced-motion detection, and support for React Native 0.72. He also covers layout animations on web, macOS, Windows, and visionOS.

Shared element transitions

Shared element transitions keep an element visually connected as users move between screens. Miron demonstrates matching elements by a shared transition tag, including transitions in both directions and transitions involving multiple elements. He notes support for Expo Router 2 and React Navigation’s Native Stack.

Documentation and motion settings

Miron highlights Reanimated’s `useReducedMotion` hook, which lets apps adapt animations to the system setting by fading, changing the animation, or skipping it. He also points to redesigned documentation with interactive spring controls for adjusting damping and stiffness, and says configurations can be copied into a project.

Open-source marquee component

Miron explains how a marquee loops content through a viewport by cloning it and moving each copy back to the tail when it leaves view. He introduces a Reanimated 3 component available on npm that supports Expo, TypeScript, and iOS, Android, web, macOS, and Windows. Examples include scrolling text, boxes, and a news ticker; the component uses `useFrameCallback`.

Open-source stagger component

A stagger animation offsets the start time for each item so a group moves in sequence rather than all at once. Miron introduces `anime-react-native-stagger`, which supports entering and exiting animations, direction, and initial delays. It supports the same listed platforms, and web layout animations require Reanimated 3.4.

Takeaways

  • Use shared transition tags to preserve visual continuity between matching elements on navigated screens.
  • Check the system’s reduced-motion preference and adapt or skip animations when needed.
  • Use `useFrameCallback` to drive a looping marquee that repositions content outside its viewport.
  • Staggering item animations can make a group feel more natural than starting every animation together.
  • For web layout animations in the stagger component, use Reanimated 3.4 or later.

Mentioned in this talk

Search inside this talk

What was claimed 14

Show all 14 facts

Related talks

React Native Animations in 2023 and Beyond, Catalin Miron · WhoBuilt