Upgrade studio packages

From time to time, versions of packages Sanity Studio depends on need 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.

Upgrade React

Before you upgrade, check that your Sanity Studio version supports the newest React release, which is what react@latest installs. The supported React range for each Studio version is listed in "Known Sanity Studio version compatibilities." To upgrade React and React DOM to the latest version, run:

npm install "react@latest" "react-dom@latest"

Note: if you have customizations in your Sanity Studio and are upgrading between major versions of React (for example, going from version 18 to 19), you may need to adjust your React components as well. 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.

v6.x

  • node@>=22.12
  • react@^19.2.2
  • react-dom@^19.2.2
  • styled-components@^6.1.15
  • @sanity/ui@^4.x

v5.x

  • node@>=20.19 <22 || >=22.12
  • react@^19.2.2
  • react-dom@^19.2.2
  • styled-components@^6.1.15
  • @sanity/ui@^3.x

v4.x

  • node@>=20.19 <22 || >=22.12
  • react@^18.2.x - react@19.x
  • react-dom@^18.2.x - react-dom@19.x
  • styled-components@^6.x
  • @sanity/ui@^3.x

v3.69.0 to v3.99.0

  • node@>=18
  • react@^18.2.x - react@19.x
  • react-dom@^18.2.x - react-dom@19.x
  • styled-components@^6.x
  • @sanity/ui@^2.x

Earlier than v3.69.0

  • node@>=18
  • react@^18.2.x
  • react-dom@^18.2.x
  • styled-components@^6.x in v3.37.0 and later. v3.19.0 to v3.36.x accept ^5.2 || ^6, and earlier versions accept only ^5.2.
  • @sanity/ui@^2.x in v3.25.0 and later. Earlier versions use @sanity/ui@^1.x, except v3.23.0 to v3.24.x, which use a 2.0.0 beta.

Was this page helpful?

sanity.ioAll Systems Operational© Sanity 2026
Change site theme