MKI
React 19.3 lets you delete your animation library
React 19.3 stabilizes View Transitions and Fragment Refs, adds a browser() API for SSR opt-outs, and ships Trusted Types support.
React 19.3 shipped on npm on September 9, 2026, and it quietly closes two gaps teams have been patching with third-party libraries for years. View Transitions and Fragment Refs, both previewed as experimental APIs back in April 2025, are now stable. Alongside them, React DOM picks up a browser() API for opting components out of server rendering, Trusted Types support for CSP-hardened sites, and a small but welcome cleanup to how Server Components share Context with client trees.
None of this is a rewrite. It is React catching up to patterns teams have been hand-rolling with Framer Motion, custom ref callbacks, and typeof window !== 'undefined' checks. If you maintain a React codebase, this release is worth a real look this week, not just a changelog skim.
What changed
The two headline features:
<ViewTransition>is a new built-in component that animates elements as they enter, exit, move, resize, or swap places, using the browser’s native View Transition API under the hood. It shipped as an experimental API in the React Labs post from April 2025 and is stable as of 19.3.- Fragment Refs let you attach a ref directly to a
<Fragment>and get back aFragmentInstancewith methods for events, focus, intersection/resize observation, and DOM measurement across a group of sibling nodes with no wrapper element.
Three smaller but real additions round out the release:
browser(), a newreact-domAPI you call asuse(browser())to make a component suspend on the server but render normally once hydrated on the client — a first-class replacement for the “mounted” state hack.- Trusted Types support, so sites enforcing
Content-Security-Policy: require-trusted-types-for 'script'no longer have React coerceTrustedHTML/TrustedScriptvalues back into plain strings before rejection. - Context rendered directly in Server Components, removing the need for a pass-through Provider wrapper component that did nothing but forward a prop.
Full details and the complete changelog are in the React 19.3 release post and the <ViewTransition> reference docs.
View Transitions, without the choreography library
Wrap anything in <ViewTransition> and React animates it automatically whenever a Transition changes its content, mounts it, unmounts it, or moves it:
import { ViewTransition, startTransition, useState } from 'react'
function Item() { return ( <ViewTransition> <Video video={videos[0]} /> </ViewTransition> )}React decides which of four animation types to run: enter when the component mounts, exit when it unmounts, update when its style or content changes in place, and share when a named <ViewTransition> unmounts in one place and a matching name mounts elsewhere in the same update — the classic “this card grew into the detail view” effect. Only updates wrapped in a Transition, a <Suspense> reveal, or useDeferredValue trigger an animation at all; a plain setState still applies instantly, so you don’t get surprise animations on urgent updates.
The default is a cross-fade, but you can assign a CSS class per trigger (enter, exit, update, share, default) and style it with ::view-transition-old(...) / ::view-transition-new(...) selectors, or reach for the Web Animations API directly through onEnter/onExit/onShare/onUpdate callbacks when you need imperative control.
The part worth pausing on is addTransitionType. Two updates can set the same piece of state — say, a carousel index going to 3 — for opposite reasons: paging forward versus paging back. addTransitionType lets you tag why a Transition happened, so the same state change can animate left-to-right or right-to-left depending on cause:
function nextSlide() { startTransition(() => { addTransitionType('next') setCurrentSlide((c) => c + 1) })}That distinction — same state, different animation depending on intent — is exactly the kind of thing router libraries and carousel components have been solving with bespoke event systems. Now it is one function call.
Suspense-aware animation is the more interesting half
The View Transitions story that will actually change how teams build loading states is the Suspense integration. Wrap a <Suspense> boundary in <ViewTransition> and React animates the swap from fallback to real content once data, images, and even @font-face resources finish loading:
<ViewTransition update="auto" default="none"> <Suspense fallback={<VideoPlaceholder />}> <LazyVideo /> </Suspense></ViewTransition>The React team’s own guidance here is blunt and worth repeating: fallbacks should appear immediately without animation, already-loaded content should appear immediately without animation, and only the fallback-to-content swap should animate. Get that balance wrong and every re-render of already-cached UI looks like a loading spinner cross-fading in — the exact flicker View Transitions was supposed to fix. The update="auto" default="none" pattern in the release post is the one to copy first; expand from there once you understand which of your Suspense boundaries actually benefit from a transition versus which should just render.
Wrapping an <img> or a <style> tag carrying a @font-face block inside that same boundary opts them into Suspense too, which means you can finally coordinate “wait for data, image, and font, then reveal everything together” without a hand-rolled Promise.all and a loading-state reducer.
Fragment Refs close a gap component libraries have hit for years
If you have ever written a component that renders a flat list of siblings — table rows, menu items, a group of headings — and needed to attach a scroll listener, an IntersectionObserver, or a shared focus behavior across all of them, you know the usual fix: wrap them in a <div> you didn’t otherwise want, purely to have somewhere to put a ref.
Fragment Refs remove that trade-off. Pass a ref straight to <Fragment> and you get a FragmentInstance back:
function Component() { const fragmentRef = useRef(null)
useEffect(() => { fragmentRef.current.focus() }, [])
return ( <Fragment ref={fragmentRef}> {posts.map((post) => ( <Heading key={post.id}>{post.title}</Heading> ))} </Fragment> )}The instance exposes addEventListener/removeEventListener/dispatchEvent for the first-level children as a group, focus/focusLast/blur for depth-first focus management, observeUsing/unobserveUsing to wire up an IntersectionObserver or ResizeObserver, and getClientRects/scrollIntoView/compareDocumentPosition for measurement. Crucially, none of this requires the component you’re wrapping to expose a ref prop of its own — which matters a lot if that component ships from a library you don’t control.
If you maintain a component library, this is the feature to evaluate first. It lets you add onVisible, focus-trapping, or event-delegation behavior to a component’s rendered output without touching that component’s internals or forcing every consumer through an extra wrapper element that might break their layout.
The quieter additions carry real weight too
use(browser()) is a small API with an outsized effect on how you write server-rendered components that depend on client-only state — localStorage, the local timezone, matchMedia. Instead of the familiar useState + useEffect “mounted” dance, or a typeof window !== 'undefined' guard that scatters environment checks through your render logic, you call use(browser()) and the component suspends during server rendering (showing the nearest fallback in the HTML) and simply renders once hydrated:
import { use } from 'react'import { browser } from 'react-dom'
function TimeZone() { use(browser()) const timeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone return <p>{timeZone}</p>}Because it’s a use() call, it can sit behind a conditional — so a data-fetching hook can call use(browser()) only when it wasn’t handed initial data from a Server Component or loader, and skip it otherwise. That’s a genuinely useful pattern for teams straddling server-rendered and client-only data sources in the same hook.
Trusted Types support matters specifically for teams already running Content-Security-Policy: require-trusted-types-for 'script' as an XSS mitigation — previously React’s habit of coercing everything to a string before handing it to the DOM defeated the whole point of a TrustedHTML object. If your CSP audit has Trusted Types on the roadmap, React no longer fighting you here removes one blocker.
And the Server Components change — rendering a Context object directly instead of requiring a pass-through Provider component — is a small deletion of boilerplate, but it’s the kind of boilerplate that accumulates in any app passing request-scoped data (current user, locale, feature flags) from a server layout into a client tree.
What we’d do about it
Most of our own builds are static Astro sites, where React shows up as an island for the genuinely interactive pieces — a booking flow, a configurator, an admin dashboard embedded in an otherwise static page. That’s exactly where these features earn their keep, and it’s worth being deliberate about it rather than reaching for a dependency out of habit:
- If you’re pulling in Framer Motion or react-spring purely for enter/exit and shared-element transitions, audit whether
<ViewTransition>now covers it before adding (or renewing) that dependency. It’s a smaller bundle and one fewer API surface to keep in sync with React versions. - If you’re building or maintaining a component library, look at Fragment Refs before your next wrapper-
<div>-just-for-a-ref decision. It’s a cleaner contract for consumers. - If your app straddles SSR and client-only data — feature flags, locale detection, anything reading
window— try thebrowser()pattern instead of a mounted-state effect. It plays correctly with Suspense instead of causing a layout flash after hydration. - If Content-Security-Policy hardening with Trusted Types is on your security backlog, this release removes a real obstacle; it’s worth re-running that plan now.
None of this requires touching how the rest of a page is built — a <ViewTransition>-wrapped React island still animates cleanly inside a static Astro page, the same way browser-native view transitions do at the page-navigation level. The two aren’t a replacement for each other: page-level transitions are a browser API you can use with zero JavaScript framework at all, while React’s <ViewTransition> is for animating state changes and Suspense reveals inside a component tree. Most projects that need both will end up using both.
If you’re weighing whether an interactive feature needs a full React island or can stay declarative HTML and CSS, that’s a conversation worth having early — get in touch or see how we scope web development work before the build starts, and what we look at during ongoing maintenance once something ships.
Sources
- React 19.3 — React Blog (September 9, 2026)
- <ViewTransition> — React Reference Docs
- React Labs: View Transitions, Activity, and more — React Blog (April 23, 2025)