View Transitions in React

June 12th, 2024//Ep. 186

Ryan tells Sam about his experiments with using the new View Transitions API in a React photo gallery app. He talks about how he likes the flexibility of the API, how to think about integrating it into any client-rendered app regardless of the framework, and how he used a Promise with an Effect to tie a View Transition to a React Transition.

Timestamps

  • Intro
  • What it’s like to integrate View Transitions with React
  • How View Transitions work
  • Building a gallery that animates photos across page navigations
  • How to use startViewTransition for enter/update/exit animations
  • Using a Promise to link a View Transition to a React Transition
  • Do View Transitions replace framework-specific animation libraries?
  • Using DevTools to preview and tweak transitions