How to Check React Version? [React Latest Version]

Working with the latest react version will increase your productivity, so this article will help you How to check react version. What current react version is installed in your operating system?

Updated: 21 Jul, 25 by Antoniy Yushkevych 10 Min

List of content you will read in this article:

ReactJS has become a top choice for modern frontend developers, but as the ecosystem evolves rapidly, it's essential to check your React version before adding new features, fixing bugs, or upgrading libraries. Whether you're maintaining a legacy project or kicking off something fresh with Create React App, Vite, or Next.js, understanding your current React setup is the first step to working smarter.

In this guide, you'll learn how to check React version, check version in package.json, use the React version command in the CLI, check React Native version, and more.

 

🔄 Version Compatibility

Not all third-party libraries or tools support every React version. Using outdated React might prevent you from leveraging modern UI frameworks, hooks, or features introduced in recent releases like Concurrent Mode or Server Components.

🚀 Migration Planning

Before upgrading your project, knowing the current version helps plan dependencies, read migration guides, and avoid compatibility issues.

🐛 Debugging Errors

Sometimes errors occur because your version of React lacks support for certain methods or hooks. Checking the version helps identify whether it’s a bug, a deprecated feature, or an unsupported API.

 

🔍 Method 1: Check React Version in package.json File

Your first stop should be the package.json file located in your project’s root directory. This file contains a list of dependencies including the installed React version.

📋 Steps:

  1. Open your React project folder.
  2. Open package.json using a code editor (like VSCode).
  3. Look under the dependencies section for react and react-dom.

"dependencies": {

  "react": "^18.2.0",

  "react-dom": "^18.2.0",

  ...

}

The ^ symbol in ^18.2.0 means the version can be updated to any minor or patch version under 19.x.x.

🟢 Pro Tip: If you're planning to upgrade React, refer to the React changelog first to ensure you're aware of potential breaking changes.

 

💻 Method 2: Use React Version Command in CLI

One of the easiest and most accurate ways to check React version is using the command line.

📌 Commands to Use:

Open your terminal in your React project folder and run:

npm list react

Expected Output:

my-react-app@0.1.0 /Users/you/projects/my-react-app

└── react@18.2.0

To check the version of React DOM as well, use:

npm list react-dom

If you're using Yarn:

yarn list react

💡 Troubleshooting: If you receive an error like empty, you may not be in a valid React project folder or haven’t installed React yet.

 

🌐 Method 3: Using Browser Console or DevTools to Check React Version

If your React app is running in the browser, you can check the React version directly using Developer Tools.

👇 Steps:

  1. Open your application in the browser.
  2. Open DevTools (Right-click > Inspect or press Ctrl + Shift + I).
  3. Go to the Console tab.
  4. Type:

React.version

If React is exposed globally (which is often true in development mode), it will return something like:

"18.2.0"

🟢 Alternative:

If React DevTools is installed, it may also expose this variable through:

__REACT_DEVTOOLS_GLOBAL_HOOK__

This is useful if you’re debugging or need deeper inspection.

 

Different React-based setups might involve additional tools or wrappers like CRA, Next.js, Gatsby, or React Native. Here's how to check your version in each:

📦 Create React App (CRA)

Create React App typically manages the React version in package.json. You can also run:

npx create-react-app --version

However, for React-specific info, use:

npm list react

npm list react-dom

 

📱 Check React Native Version

React Native uses its own versioning and libraries. To check React Native version, you can run:

npm view react-native version

Or, for the version installed globally on your machine:

npm ls react-native -g

Expected Output:

/usr/local/lib

└── react-native@0.73.0

You can also check package.json:

"react-native": "0.73.0"

📌 Want more mobile-specific insights? Check out our guide on How to Check Angular Version — great for comparing multi-framework apps.

 

🌍 Next.js / Gatsby

For Next.js projects, the React version is still listed under package.json:

"react": "^18.2.0",

"next": "13.4.10"

To check via CLI:

npm list react

npm list next

Gatsby follows a similar pattern:

npm list react

npm list gatsby

🧠 Want to see how React compares to other top languages? Explore our 10 Best Programming Languages to Learn in 2025

 

React Version

Major Features

16.8

Hooks Introduced (useState, useEffect)

17

Gradual Upgrade Support

18

Automatic Batching, Concurrent Rendering

18.3+

Server Components, Suspense Improvements

This is useful when comparing your current setup with a project that uses more modern React functionality. For example, if your version is <16.8, you won't be able to use hooks like useState.

 

Even after learning how to check React version, you might face some errors when running commands or managing versions. Here’s how to troubleshoot the most common issues developers encounter.

❌ React Not Found

If running npm list react or npm view react version returns an empty output or a message like:

-- react@empty

or

npm ERR! missing: react@*, required by your-project@0.1.0

🔎 Possible Causes:

  • You're not inside a valid React project folder.
  • React hasn’t been installed yet.
  • Your node_modules folder is missing or corrupted.

🛠️ Solutions:

Check if you’re in the right directory:

pwd   # On Mac/Linux

cd path/to/your/react-project

1. Install React and ReactDOM manually:

npm install react react-dom

2. If you use Yarn:

yarn add react react-dom

 

❌ Version Mismatch Between React and ReactDOM

React and ReactDOM should ideally be on the same version to avoid rendering or hydration issues, especially in projects using SSR (like Next.js) or strict mode.

📉 Symptoms:

  • Runtime errors like Invariant Violation
  • Hydration warnings in the browser
  • Broken rendering or lifecycle behavior

🛠️ Fix:

Check both versions using:

npm list react

npm list react-dom

If they differ, align them by reinstalling:

npm install react@18.2.0 react-dom@18.2.0

🧠 Why It Matters:

ReactDOM handles the rendering process, so mismatched versions can cause unexpected UI behavior or development errors.

 

❌ CLI Commands Not Working or Hanging

Sometimes, commands like npm list, npm install, or npm start might fail or hang unexpectedly.

🔎 Common Reasons:

  • Corrupted node_modules
  • Outdated package-lock.json
  • Version conflicts between packages

🛠️ Steps to Fix:

Delete node_modules and lock files:

rm -rf node_modules package-lock.json

1. Reinstall dependencies:

npm install

If using Yarn:

rm -rf node_modules yarn.lock

yarn install

Optional: Clear the npm cache to avoid using corrupt packages:

npm cache clean --force

 

❓ Still Not Working?

Try creating a new React project using Create React App to test your Node/npm setup:

npx create-react-app test-app

cd test-app

npm list react

If this works but your original project still fails, the issue may be specific to your project configuration or dependencies.

 

Once you've learned how to check React version, the next step is knowing how to update it—especially if you're planning to use modern features or fix security vulnerabilities.

🆙 Upgrade React to the Latest Version

Use the npm install command to upgrade:

npm install react@latest react-dom@latest

Or if you use Yarn:

yarn add react@latest react-dom@latest

This will install the most recent stable versions. You can confirm the update with:

npm list react

npm list react-dom

 

⬇️ Downgrade to a Specific Version

Sometimes, certain dependencies require you to stick with an older version. You can downgrade React like this:

npm install react@16.14.0 react-dom@16.14.0

Then verify it in your package.json:

"dependencies": {

  "react": "^16.14.0",

  "react-dom": "^16.14.0"

}

 

React has evolved significantly over the years. Here’s a handy table to understand what features you get with your version.

React Version

Release Date

Key Features

16.8

Feb 2019

Introduced Hooks (useState, useEffect, useContext)

17.0

Oct 2020

Gradual upgrade path, no new features, but major cleanup

18.0

Mar 2022

Automatic Batching, useTransition, Concurrent Mode

18.2

June 2022

Minor improvements, current stable version

18.3+ (alpha)

2024+

Server Components, streaming SSR, Suspense for data fetching

Knowing this helps you avoid using unsupported features in your app and prevents migration surprises.

 

Before wrapping up, here's a summary of everything you can do:

  • ✅ Use package.json to check version in package.json
  • ✅ Use npm list react or yarn list react for CLI checks
  • ✅ Use the browser console to view React.version
  • ✅ Check React Native or Next.js versions with appropriate commands
  • ✅ Troubleshoot version issues and plan upgrades safely

Knowing how to check React version ensures smoother upgrades, fewer bugs, and better compatibility with your dev stack. It’s a small step that pays off massively in the long run.

If you’re also working with Angular, don’t miss our detailed guide on How to check Angular version. Want to become a multi-framework expert? Start by exploring the 10 Best Programming Languages to Learn in 2025.

Need performance and stability for your React projects? Host your app on Linux VPS Hosting to scale fast and deploy globally.

 

People Are Also Reading:

Run the following command in your project root: npm list react

Open the package.json file and look under dependencies: "react": "^18.2.0"

Yes, in development mode: React.version Also, the React DevTools extension may expose React-specific details in the console.

Run: npm view react-native version Or for global installs: npm ls react-native -g

Make sure you're in the project root. If it's still missing: npm install react react-dom

Antoniy Yushkevych

Antoniy Yushkevych

Master of word when it comes to technology, internet and privacy. I'm also your usual guy that always aims for the best result and takes a skateboard to work. If you need me, you will find me at the office's Counter-Strike championships on Fridays or at a.yushkevych@monovm.com
user monovm

Mr. Jacques Bergstrom

2024, Sep, 24

This article does a fantastic job of breaking down the history and features of React.js, making it evident why it has become such a vital tool for front-end developers. The detailed steps on checking and updating React versions are super helpful, especially for those new to the library. Great resource for anyone looking to dive deeper into React and stay updated with its latest developments!

user monovm

Ms. Kaia McDermott

2024, Oct, 24

This post is a comprehensive guide for anyone navigating the React.js journey. I love how you've detailed not just the history and versions but also practical steps to check and upgrade React versions. It's great to see such in-depth coverage, from its creation to its position as a cornerstone in modern web development. For anyone working on React apps, having this resource handy is essential. Thanks for putting this together!

user monovm

Dangelo Nader

2025, Mar, 25

This article brilliantly captures the evolution and impact of React.js on the development landscape. It's fascinating to see how a solution born out of necessity has become a cornerstone for front-end developers worldwide. The historical timeline and functional breakdown offer an insightful overview for both newcomers and seasoned developers. Truly a testament to how innovation can simplify and enhance web development. Great read!

user monovm

Mr. Skye Marvin III

2025, Mar, 25

Great read! It's fascinating to see how React.js has transformed the landscape for front-end developers, providing such a robust framework for building user-friendly and intricate web applications. Thanks for breaking down the history and the versions in such a comprehensible manner. This detailed guide is incredibly helpful for both beginners and seasoned developers aiming to keep their projects up-to-date with the latest React versions. Looking forward to more insightful content like this!