Sanity Studio v5: Embracing React 19
The sanity npm package now requires React 19.2. Your Studio code works exactly as before. Here's what you need to know about this update.

Knut Melvær
Head of Developer Community and Education

Bjørge Næss
Bjørge is a Staff Software Engineer at Sanity
Published
We're moving the sanity package from v4 to v5. The only breaking change to the Studio? We now require React 19.2 instead of supporting React 18.
That's it. Your schemas, plugins, and customizations work exactly as before.
If you're already on React 19.2, you're good to go. If not, follow the upgrade steps below.
Why we're doing this
React 19 shipped December 2024, bringing significant performance improvements and powerful new features. Sanity Studio has officially supported React 19 since day one. But maintaining backward compatibility with React 18 has held us back. It has now been out for one year, and it’s time to move with the rest of the ecosystem. For comparison, Next.js 15 has required React 19 since July 2025 through their version 15 and 16.
Here's what the React 18 compatibility cost us:
We couldn't use React 19's best features. The use() hook enables more efficient data fetching patterns. The <Activity> component (introduced in React 19.2) allows managing component visibility in performant, user-friendly ways. We've been watching these capabilities from the sidelines.
Every feature took longer to ship. Both our core team and plugin authors spent extra cycles ensuring React 18 compatibility. Time that could have gone into making Studio better.
Performance gains left on the table. React 19 includes rendering optimizations that benefit everyone. Staying on React 18 meant our users missed out.
We considered bending the rules and supporting both versions longer. But the ecosystem has moved on, and so should we.
We've been preparing for this
We have been part of the React Working Group, and we've shipped React Compiler-optimized code on npm for almost a year. Our internal benchmarks show 20-30% improvements in editing frame rates. We've even shipped products using React 19's experimental <Activity> component in production.
For the technical deep-dive, watch Cody Olsen's React Conf talk on how we adopted the React Compiler across our codebase.
Why 19.2 specifically?
You might wonder why we're requiring 19.2 instead of 19.0.
Upgrading from React 19.0 to 19.2 requires zero code changes. If you're already on any React 19 version, bumping to 19.2 is a simple dependency update. The <Activity> component we mentioned ships in 19.2, and we want to use it.
A note on the recent React Security Advisory
You may have seen CVE-2025-55182, a critical vulnerability in React Server Components.
Sanity Studio is not affected directly. Studio doesn't use React Server Components, and studios deployed with Sanity weren't vulnerable. We've reviewed all our internal apps and packages.
If your broader application uses React Server Components alongside Studio (like a Next.js App Router app), check that you're on the patched React versions (19.0.1, 19.1.2, or 19.2.1). Major hosting platforms including Vercel, Netlify, Cloudflare, and Deno also deployed network-level fixes before the vulnerability was publicly announced.
Since we're requiring React 19.2 for Sanity v5, use 19.2.3 or later to get both the features we need and the security fix.
What this means for you
If you're a Studio user
Nothing changes for you. The developers maintaining your Studio will handle the update. Once they do, you'll benefit from improved performance automatically.
If you're a developer maintaining Studios
Already on React 19.2? Upgrade to Sanity v5 when it ships. You're done.
Still on React 18? You'll need to upgrade React first.
Before you upgrade, make sure you've addressed any deprecation warnings. Run sanity dev with your current React 18 setup and check the console. React 18.3 added warnings for patterns that would break in 19. It’s fairly unlikely, but if you see warnings, fix them first.
Enable React Strict Mode for testing React 19 compatibility: Make sure reactStrictMode is enabled in your sanity.cli.ts (⚠️ not sanity.config.ts) to catch potential compatibility issues before upgrading. This setting only affects development mode and helps identify problems with concurrent features like Suspense:
You can also enable it via environment variable with SANITY_STUDIO_REACT_STRICT_MODE="true". This setting only applies during development with sanity dev and is ignored in production builds.
Then update Sanity and React:
npm install react@latest react-dom@latest npm install sanity@latest
If you are a Sanity Studio plugin developer
If your plugin only supports React 18: Time to update. Test with React 19.2, update your peerDependencies, and ship a new version. Otherwise, your plugin won't work with Sanity v5 studios.
If you've been testing both React 18 and 19: Thank you for your diligence. You can now simplify your testing matrix and start using React 19 features without worrying about breaking React 18 studios. Keep in mind that when your plugin starts adopting React 19-only features, that’s will be a breaking change for your plugin as well and should be subject to a major version bump.
If your plugin already works with React 19: Update your peerDependencies to include Sanity v5:
{
"peerDependencies": {
"sanity": "^3.0.0 || ^4.0.0 || ^5.0.0"
}
}One caveat: Auto-updating Studios
Studios deployed with auto-updates enabled and built on React 18 won't automatically jump to v5. This is intentional. React 18 to 19 is a runtime change that requires rebuilding your Studio.
You'll need to manually update your dependencies and redeploy. We think this is the responsible approach. Surprises in production help nobody.
# npm npx sanity deploy # pnpm pnpx sanity deploy # bun bunx sanity deploy
This is not like v2 → v3
If you were around for the v2 to v3 migration, you might be bracing for impact. Don't.
That transition reimagined how Sanity Studio worked. It required significant migration effort and taught us a lot about managing change (especially what not to do).
Like v3 to v4, v4 to v5 doesn’t come with breaking changes to the Studio API. It's a dependency requirement change, not a platform overhaul. Your code stays the same. We're just aligning with where the React ecosystem has moved.
What's coming
With React 19.2 as our baseline, we can move faster on improvements we've been planning:
Continued vanilla-extract migration. We're transitioning away from styled-components for better performance. React 19.2 is a prerequisite for this work. Sanity v5 still supports styled-components, but you'll get the full performance benefits of React 19 by using our recommended styling approach.
New Studio features. The use() hook and <Activity> component unlock patterns that weren't possible before. Expect improvements to how Studio handles loading states and background work.
Our versioning philosophy
We adopted standard semantic versioning with v4, and we're sticking with it:
- Patch versions (5.0.x): Bug fixes only
- Minor versions (5.x.0): New features, backward compatible
- Major versions (x.0.0): Breaking changes (like this one)
Major bumps will happen more often, but they'll be far less dramatic. Think maintenance updates, not platform rewrites.
Our commitment hasn't changed: we avoid breaking changes whenever possible. When we can't avoid them, we make them as painless as we can.
Ready to upgrade?
Check if you're already on React 19:
If you see 19.2.x or later, you're set for v5. If you see 18.x, upgrade React before December 16th to be ready.
Questions? Find us in the Sanity Community Discord or check the changelog when v5 ships.