00Labs · Note

ViewTransition from 'react' is undefined: Next 16 docs vs. React 19.2

Next 16 documents <ViewTransition>, React 19.2.4 does not ship it: the import is silently undefined. Since React 19.3 the export is there.

· 1 min read · updated

Update 2026-10-23: React 19.3 now exports ViewTransition as stable (checked against react@19.3.1). The note below describes the state with React 19.2.4, which this repo still has installed. If you move to 19.3, you can follow the Next guide.

Symptom

The Next 16 view transitions guide is unambiguous: flip experimental.viewTransition in the config, then import { ViewTransition } from 'react'. Done, built, and nothing happens. No animation, no warning, no error.

Cause

That export does not exist in the React 19.2.4 installed here, not as ViewTransition, not as unstable_ViewTransition. The docs describe a React version that had not shipped at the time.

Nothing is misconfigured, and there is no useful error either. A named import the module does not have is simply undefined, and React renders an empty element.

Check instead of guessing:

node -e "const R = require('react'); console.log(R.version, 'ViewTransition' in R)"

With React 19.2.4 that prints false. With 19.3.1, true.

Fix

Two ways.

Upgrade React. From React 19.3 the export is there, and the Next guide works as written:

npm install react@^19.3 react-dom@^19.3

Or stay with a library. Route transitions here keep running through framer-motion in components/motion/PageTransition.tsx, keyed on usePathname():

<motion.div
  key={pathname}
  initial={{ opacity: 0, y: 14, filter: "blur(6px)" }}
  animate={{ opacity: 1, y: 0, filter: "blur(0px)" }}
/>

Costs a little bundle, but works with any React 19 version and respects prefers-reduced-motion through useReducedMotion().

Tested with Next.js 16.2.5, React 19.2.4 and 19.3.1, framer-motion 12.38.

See also