React is likely the most popular framework for developing next-generation web applications. Its open development, constant upgrading and extensive support community offer a robust tool of development for an interface. Even in good projects, sometimes it can be needed to check React version that is utilized in an application.
Why do this? For a number of reasons:
- Library and plugin compatibility – the majority of third-party solutions depend on a specific version of React.
- Performance and innovation – with every version update, updates, enhancements, bug fixes and optimizations release.
- Security – Older versions might have vulnerabilities already fixed in more recent releases.
In this article we will talk about how quickly and easily it is to verify the latest version of React in a project, which tools use for this and what to do in case your React is outdated.

Why Is It Important to Know the React Version?
In the world of frontend development, every detail matters, and the check version of React used in your project is not an exception. Knowledge of the current version helps to avoid compatibility problems, use advanced features and maintain a high level of application security.
Compatibility of Libraries and Plugins
React is not just a library, but a whole ecosystem of tools and third-party libraries. Most widely used libraries, for instance, React Router, Redux or Material-UI, depend on specific versions of React. Using an outdated version can lead to:
- conflicts between dependencies,
- the new features can’t be used
- errors during compilation or execution of the application.
Access to New Possibilities
Each new version of React contains improvements that make development easier and faster. For example:
- React 16 introduced us to React Hooks, which changed the way we manage our state.
- React 17 optimized event handling and updating of components.
- React 18 introduced Concurrent Mode and Automatic Batching, making rendering more efficient and responsive.
Being on the latest stable release allows your team to utilize the latest tools and write more optimized coding.
Security and Bug Fixing
As with any software, previous versions of React are likely to contain bugs and security issues. Facebook engineers and the React community relentlessly release patches and updates that eliminate:
- security vulnerability,
- performance errors,
- the components are unstable.
Updating React is not just about accessing new things, but also protecting the application from potential risks.
Ways to Verify the React Version
Check React version in a project is necessary to support compatibility, test new functions and prevent possible conflicts with dependencies. There are a few easy ways to find out which version of React is used in your application.
How to check:
Version Check In package.json
The quickest way is to look at package.json. This file contains a list of all project dependencies, including React.
- Open the project root folder.
- Find and open the file package.json.
- Find the string with “react” and “react-dom” – opposite will be specified version.
Example:
//
“dependencies”: {
“react”: ” 18.2.0″,
“react-dom”: ” 18.2.0″
}
//
This is the React version 18.2.0.
Version Check via Command Line
If you need to quickly learn the React version without opening files, you can use the command line.
Commands to check:
- If the project uses npm:
//
npm list react
//
- If yarn is used:
//
yarn list react
//
You will get something like:
//
//
This is the installed version of React.
Version Check via Browser Console
If you already have a React application running, you can get the version directly from the browser using DevTools.
How to do this:
- Open the web application in your browser.
- Open DevTools (F12 or Ctrl + Shift + I in Chrome).
- Go to the “Console” tab.
- Enter the command:
React.version
- You will receive a version number in return.
This is useful if you do not have access to the project files, but the application is already running.
Choosing the Best Method
- If you have access to the project, it is easiest to check the version in package.json.
- If you need a quick way, use npm list react.
- If the project is already deployed and the source is not available, use the browser console.
Regular testing of the React version helps avoid compatibility issues and update dependencies in a timely manner, ensuring application stability.
Step-by-Step Guide to Checking React Version

Celadonsoft, a professional React development company, created a step-by-step tutorial on checking the React version:
Step 1: Checking package.json Version
One fast method of determining the current version of React is by looking within the package.json file.
1. Navigate into your project directory.
2. Find and open the package.json file.
3. Check under the dependencies or devDependencies and find: “react”: “18.2.0”
This is the version list of React that your project is including. The ^ symbol means there are minor increments in version 18.
Step 2: Use npm or yarn
If you’re already in the terminal, you can simply check installed version using the following command:
For projects which utilize npm: npm list react
For projects that utilize yarn: yarn list –pattern react
These will show you the actual version of React being used by the project.
Step 3: Explore from the Browser Console
In case you have a React application running on you, you can just verify the version from within your browser:
1. Open DevTools.
2. Move to the “Console” tab.
3. Type in the command: React.version
or in case React was loaded using window: window.React.version
4. You’ll get to view the version of React that is currently used, printed to the console.
This method is especially useful when you don’t have access to project files but just want to check the version.
Tutorial What to Do When the Version Is Outdated
Once you have confirmed your version of React and find that it’s outdated, then it’s good to follow a few steps towards upgrading safely and ensuring that you are compatible. Periodic updates of your React version not only serve you well by taking advantage of new functionality and improvements, but also keep your application safer and more robust.
Planning for Renewal
Before you upgrade React, you need to prepare a project. A library update can impact the entire application, so you need to perform the following:
- Evaluate the impact of changes. Read the official release notes and find out what changes and features are introduced in the new version.
- Backup. It is recommended to create a backup copy of the project prior to updating, so that in case of an error, you can revert to the previous version immediately.
- Compatibility with other dependencies. Some packages or third-party libraries do not support the latest versions of React. Update them or substitute them if necessary.
Compatibility Testing
After you have ended the process of updating the project, the next step will be to check for compatibility. This will prevent any errors post-upgrade and also make sure that the application is stable:
- Conduct local tests. If the project has unit tests or integration tests, make sure they run successfully post-upgrade.
- Use test environments. If possible, open another branch to test the new React version to see how the app behaves with live data without making changes to the primary working environment.
- Check interface. Visually verify that the components and interfaces created on top of React haven’t been altered to affect the user experience.
Update the Dependencies
When you upgrade React, normally you will also need to upgrade other project dependencies. These are some tips on how to do this:
- Upgrade all the packages that are involved. Most libraries, such as React Router, Redux and others, may be dependent on the React version. Execute the npm outdated or yarn outdated command in order to determine which packages need to be upgraded.
- Use automatic tools to update dependencies. Dependant or Renovate will help you to automatically update your dependencies, reducing human error.
- Read documentation. Libraries will sometimes have something to set or to change code as a response to an update in React. Read the documentation of each dependency to know how you are meant to properly update it to a later version.
Conclusion
Periodic versioning update and testing of the React version is not only a technical necessity, but also an essential step in ensuring the troubleshooting and performance of your app. An older version can lead to library incompatibilities, missed new API features and potential code vulnerabilities.
Proactive dependency management avoids most problems:
- Project stability. Working with newer versions reduces the likelihood of surprise bugs and dependency conflicts.
- Access to new features. Each update for React brings quicker performance, more hooks and tools for easy development.
- Security and support. New stack technology provides known vulnerability protection and is simple to integrate with new tools.