Structured Content 2022: Join our conference to explore fresh perspectives on content and digital experiences →

Upgrade studio packages

From time to time, versions of packages the Content 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.

Currently the Content Studio requires React (the react and react-dom packages) at version 16.3 or newer. Everything below 16.9 will soon be deprecated.

Depending on which package manager you use, you can run either of the following commands to upgrade the React version used in your studio:

Using yarn

yarn add "react@^16.9" "react-dom@^16.9"

Using npm

npm install "react@^16.9" "react-dom@^16.9"

Note: if you have local customizations in your Sanity Studio and are upgrading between major versions of React (e.g. going from version 16 to 17) you may need to do some adjustments to your React components as well. Please consult the React changelog for details on how to migrate to the latest version.

Was this article helpful?