View Transitions in React: A New Era of Seamless UI

Bookmark
Rate this content

React’s new support for the native View Transitions API unlocks smooth, layout-aware animations between routes and components — no more manual DOM hacks or client-only libraries. In this talk, we’ll explore how to use View Transitions with React 19+, Next.js App Router, and React Server Components to build polished, performance-first UIs with minimal code.

This talk has been presented at React Summit US 2025, check out the latest edition of this React Conference.

FAQ

The View Transition API is a native browser feature built to create smooth transitions by capturing the DOM state before and after changes, allowing the browser to animate between them without manual intervention.

React 19 embraces the View Transition API with the View Transition component, making transitions declarative and native to React, integrating them with routing and supporting SSR and RSC.

The limitations include needing to wrap JSX trees for view transitions, no auto route handling, challenges with suspense and SSR, and being error-prone if transitions are not started at the correct time.

Samuel Ouyang introduces the 'Use View Transition' custom hook, which handles routing, state, and suspense for smoother transitions, is SSR safe, and works with complex nested routes.

The View Transition API aims to solve issues like zero continuities in routing changes, complex third-party animation libraries, SSR and RLC breakage, and unpredictable layout shifts.

Animations in React are considered broken due to issues with routing changes causing zero continuities, reliance on complex third-party libraries, and fragile DOM hacks that lead to SSR and RLC breakage.

The View Transition API is supported in Chrome, Edge, and Safari, with Firefox support currently in development.

Ideal use cases include route changes, card animations, tab switches, and layout changes, but it is not ideal for high-frequency streaming or complex data management.

By providing smooth, flicker-free transitions that integrate seamlessly with React's declarative nature, improving performance and UX without complex DOM hacks.

Benefits include built-in smooth transitions without manual handling, handling of route updates and full page changes, and the elimination of flickers and hydration mismatches.

Simon Ouyang
Simon Ouyang
13 min
21 Nov, 2025

Comments

Sign in or register to post your comment.
  • Simon Ouyang
    Simon Ouyang
    YC-backed Startup (Early-Stage)
    📌 React 19 View Transitions — Official Demo & Source Code Missed a detail in the talk? Want to explore the patterns yourself? Live Demo (all examples): 👉 https://view-transition-souyang.vercel.app Full Source Code on GitHub: 👉 https://github.com/souyang/view-transition-demo Includes production-ready patterns for: Route transitions Layout transitions List reordering Card / image morphing Scroll preservation Built with Next.js 15 + React 19. Fully AI-parsable, documentation-enhanced, and optimized for developer learning. Try it, break it, remix it. Would love to see what you build!
Video Summary and Transcription
Samuel Ouyang highlights the significance of smooth UI in modern apps and introduces the React 19 View Transition API. The View Transition API works with SSR and RSC but has limitations as a wrapper. Implementing the Use View Transition custom hook can address these limitations and make it SSR safe. The custom hook enables smooth transitions for various interactions like route changes, panel transitions, click events, and list reordering. It encourages the optimized use of the View Transition API to improve user experience and avoid DOM hacks.

1. Enhancing UI with View Transition API

Short description:

Samuel Ouyang discusses the importance of smooth UI in modern apps and introduces the View Transition API in React 19 to enhance user experience.

Smooth UI isn't just an eye candy, it's how the users decide if your app feels modern. Hi, I'm Samuel Ouyang, a founding engineer at AI Startups. Today I will show you how to use the React 19 and the View Transition API to unlock the seamless UI without the pain. It features how the React moves. So why do animations in React feel broken? First of all, the routing changes are juggling. There are zero continuities. So then we move to the complex third-party animation libraries. But this adds the complexity, bundle size, and boilerplate. When that is not enough, and then we're trying the fragile DOM hacks, that results in the SSR and the RLC to be broken. And a smooth UI always feels like fighting React instead of working with that.

So here's the old way of doing the transitions. The old transition technique just does not scale. The animation, the layout, resulting in the unpredictable shifts. Routing changes, introducing loading flickers, and the SSR leads to a hydration mismatch. And patching these issues kills the performance. So that means more code, more hacks, still bad UX. Then we have the frame motions. Frame motions actually was a huge step forward, but even that, it has limits. First of all, we need to add extra code to almost every component. There's no native router transitions. And also, it increases the bundle size, and does not support well with SSR and streaming.

So here comes the View Transition API. View Transition API is a native browser feature that built to solve these problems. So how does it work? First of all, it snapshots the DOM before and after. And then the browser animates between them. No manual differing, and it handles the route updates and the full page changes. For the first time, smooth transitions are built into the platform. Then the React 19 embraces this API with the View Transition component. View Transition component is experimental, but it makes the transitions declarative and native to React. It integrated with the routings, so route.push animates the page automatically.

2. Working with View Transition Limitations

Short description:

It works with SSR and RSC, has limitations as a wrapper, and lacks auto route handling. Handling suspense and SSR is challenging due to the client-side nature of the View Transition API. The Use View Transition custom hook addresses these issues, making it SSR safe and enabling auto route handling.

It works with SSR and RSC. And finally, it has the View Transition components that could work with the View Transition API. But it also has the limitations. First of all, it is a wrapper. It means that we need to wrap the JSX trees for almost every place we need to perform the view transitions. And there's no auto route handling. It means that if we're doing the router with the loadings, or we need to handle some complex routing based on the conditions, we have to wrap it carefully. And that is error-prone.

Secondly, it's hard to do with the suspense and SSR because the View Transition is a client-side API. So it means that SSR and the streaming are easy to get flashed, double rendered, and mismatched. If we start the transition at the wrong time, that also requires that you wrap the correct components at the right time using the React 19's View Transition wrapper. Then I introduce the Use View Transition custom hook that I created. It perfectly solves the problems that it works with both routing, state, and suspense.

For example, like the auto route handling. We can put it directly in the triggers of doing the routings, for example, doing the navigations, and it could also handle the complex nested routes. And it's also SSR safe and fallback to a concurrent friendly with a start transition React Native API. React gave us the engine, and I built the steering wheel to introduce the flexibilities to working with the View Transition API. Here's my code. Here's what my code looks like. Besides the declarations and other work, the real code actually just has the 10 lines.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
This talk discusses the usage of Microfrontends in Remix and introduces the Tiny Frontend library. Kazoo, a used car buying platform, follows a domain-driven design approach and encountered issues with granular slicing. Tiny Frontend aims to solve the slicing problem and promotes type safety and compatibility of shared dependencies. The speaker demonstrates how Tiny Frontend works with server-side rendering and how Remix can consume and update components without redeploying the app. The talk also explores the usage of micro frontends and the future support for Webpack Module Federation in Remix.
Understanding React’s Fiber Architecture
React Advanced 2022React Advanced 2022
29 min
Understanding React’s Fiber Architecture
Top Content
This Talk explores React's internal jargon, specifically fiber, which is an internal unit of work for rendering and committing. Fibers facilitate efficient updates to elements and play a crucial role in the reconciliation process. The work loop, complete work, and commit phase are essential steps in the rendering process. Understanding React's internals can help with optimizing code and pull request reviews. React 18 introduces the work loop sync and async functions for concurrent features and prioritization. Fiber brings benefits like async rendering and the ability to discard work-in-progress trees, improving user experience.
Thinking Like an Architect
Node Congress 2025Node Congress 2025
31 min
Thinking Like an Architect
Top Content
In modern software development, architecture is more than just selecting the right tech stack; it involves decision-making, trade-offs, and considering the context of the business and organization. Understanding the problem space and focusing on users' needs are essential. Architectural flexibility is key, adapting the level of granularity and choosing between different approaches. Holistic thinking, long-term vision, and domain understanding are crucial for making better decisions. Effective communication, inclusion, and documentation are core skills for architects. Democratizing communication, prioritizing value, and embracing adaptive architectures are key to success.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
RemixConf EU discussed full stack components and their benefits, such as marrying the backend and UI in the same file. The talk demonstrated the implementation of a combo box with search functionality using Remix and the Downshift library. It also highlighted the ease of creating resource routes in Remix and the importance of code organization and maintainability in full stack components. The speaker expressed gratitude towards the audience and discussed the future of Remix, including its acquisition by Shopify and the potential for collaboration with Hydrogen.
The Eternal Sunshine of the Zero Build Pipeline
React Finland 2021React Finland 2021
36 min
The Eternal Sunshine of the Zero Build Pipeline
For many years, we have migrated all our devtools to Node.js for the sake of simplicity: a common language (JS/TS), a large ecosystem (NPM), and a powerful engine. In the meantime, we moved a lot of computation tasks to the client-side thanks to PWA and JavaScript Hegemony.
So we made Webapps for years, developing with awesome reactive frameworks and bundling a lot of dependencies. We progressively moved from our simplicity to complex apps toolchains. We've become the new Java-like ecosystem. It sucks.
It's 2021, we've got a lot of new technologies to sustain our Users eXperience. It's time to have a break and rethink our tools rather than going faster and faster in the same direction. It's time to redesign the Developer eXperience. It's time for a bundle-free dev environment. It's time to embrace a new frontend building philosophy, still with our lovely JavaScript.
Introducing Snowpack, Vite, Astro, and other Bare Modules tools concepts!
The Dark Side of Micro-Frontends
React Advanced 2025React Advanced 2025
29 min
The Dark Side of Micro-Frontends
In the Talk, various key points were discussed regarding micro-front-end architecture. These included challenges with micro-intents, common mistakes in system design, the differences between micro-intents and components, granularity in software architecture, optimizing micro-front-end architecture, efficient routing and deployment strategies, edge computing strategies, global state and data sharing optimization, managing data context, governance and fitness functions, architectural testing, adaptive growth, value of micro-frontends, repository selection, repo structures, and web component usage.

Workshops on related topic

AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
High-performance Next.js
React Summit 2022React Summit 2022
50 min
High-performance Next.js
Workshop
Michele Riva
Michele Riva
Next.js is a compelling framework that makes many tasks effortless by providing many out-of-the-box solutions. But as soon as our app needs to scale, it is essential to maintain high performance without compromising maintenance and server costs. In this workshop, we will see how to analyze Next.js performances, resources usage, how to scale it, and how to make the right decisions while writing the application architecture.
Model Context Protocol (MCP) Deep Dive: 2-Hour Interactive Workshop
AI Coding SummitAI Coding Summit
86 min
Model Context Protocol (MCP) Deep Dive: 2-Hour Interactive Workshop
Workshop
Stepan Suvorov
Stepan Suvorov
Join a focused 2-hour session covering MCP's purpose, architecture, hands-on server implementation, and future directions. Designed for developers and system architects aiming to integrate contextual data with ML models effectively. Agenda:- Introduction & Why MCP? Key challenges MCP solves and core benefits.- Architecture Deep Dive: components, interactions, scalability principles. - Building Your Own MCP Server: guided walkthrough with code snippets and best practices; live demo or code review.- Future of MCP Developments: potential enhancements, emerging trends, real-world scenarios.
Key Takeaways:- Clear understanding of MCP's rationale.- Insight into design patterns and scaling considerations.- Practical steps to implement a prototype server.- Awareness of upcoming trends and how to apply MCP in projects.