Upgrade studio packages
From time to time, versions of packages Sanity Studio depends on needs to be upgraded. This can be done either by manually entering a new version of the dependency in your studio folder's package.json, or by running a command from your command line.
Upgrading React
npm install react@latest react-dom@latest
pnpm add react@latest react-dom@latest
yarn add react@latest react-dom@latest
bun add react@latest react-dom@latest
Note: if you have customizations in your Sanity Studio and are upgrading between major versions of React (e.g. going from version 18 to 19) you may need to do some adjustments to your React components as well. Please consult the release announcements on the React blog for details on how to migrate to the latest version.
Known Sanity Studio version compatibilities
This is a non-exhaustive list of dependencies Sanity Studio is known to work with. Anything outside of these ranges might still work, but we recommend keeping up to date with current versions to get the latest stability and performance improvements.
v5.x (upcoming)
react@^19.2.x or higherreact@19.2.x or higherstyled-components@^6.x@sanity/ui@^3.x
v4.x
react@^18.2.x - react@19.xreact-dom@^18.2.x - react@19.xstyled-components@^6.x@sanity/ui@^3.x
v3.69.0 -> v3.99.0
react@^18.2.x - react@19.xreact-dom@^18.2.x - react@19.xstyled-components@^6.x@sanity/ui@^2.x
< v3.69.0
react@^18.2.xreact-dom@^18.2.xstyled-components@^6.x@sanity/ui@^2.x
Was this page helpful?