How To Check The Version of ReactJS Project?
Last Updated :
11 Apr, 2025
Whether you're debugging an issue, updating a project, or just curious, about knowing the version of ReactJS used in your application, you can easily do it using these simple methods.
In this article, we’ll walk you through different ways to check the version of ReactJS used in a project using methods like package files, CLI, and the browser console.
How to Check the ReactJS Version
Here are different methods to determine the version of ReactJS.
1. Using the package.json file
The package.json contains metadata about our project. It is created by default when we create our React project. We can create a react app using the command mentioned below.
npx create-react-app project-name
The package.json file contains a lot of information in the name/value pairs in JSON format. We can easily check our React version under the list of dependencies in the package.json file.
2. Using the command line
We can easily check the React version by using the command in the command line
npm list react
3. Using the version property of default import from React
The default import from React library is an object that has a version property on it. We can use this property inside our JSX elements in our desired manner.
JavaScript
// Filename - App.js
import React from "react";
const App = () => {
return (
<h1>
We are currently using react version{" "}
{React.version}
</h1>
);
};
export default App;
Output
Using the version property of default import from React
4. Check the Version in the Browser (React Developer Tools)
React Developer Tools is a browser extension available for both Chrome and Firefox. It provides an easy way to inspect the React component tree and check the version of React being used in a live application.
Steps:
- Install React Developer Tools for your browser (available for Chrome or Firefox).
- Open the application you want to inspect in your browser.
- Open the Developer Tools (Right-click on the page > Inspect or press Ctrl+Shift+I).
- Click on the React tab (if installed and detected).
- In the top-right corner of the React tab, you’ll see the React version displayed, like
React version: 19.1.0
Conclusion
In this article, we explored several methods to check the version of ReactJS in your project. Whether it's through inspecting the package.json file, using the command line, accessing the version via React’s default import, utilizing React Developer Tools, or checking with create-react-app, these methods help ensure you're aware of the React version you're working with.
Similar Reads
How to check the version of React native ? React Native is a mobile app framework to build natively-rendered apps based on JavaScript. To know the version of React Native (RN), we can use some simple ways. In this article, we will see four easy ways to find the react native version: Using TerminalUsing npxUsing package.jsonUsing the info opt
2 min read
How To Check The Version Of GitLab? GitLab is a web-based DevOps platform that provides development teams with the tools to collaborate, automate repetitive tasks and build faster and better software. In this article, we will explore how to check the version of GitLab.There are multiple ways to check the version of GitLab installed on
2 min read
How to Check NPM Version? Node Package Manager (npm) is an essential tool for managing JavaScript projects. Whether you're working on a simple script or a large application, knowing your npm version is important for ensuring compatibility and troubleshooting issues. How to Check NPM Version?To check your npm version, you can
3 min read
How to Test React Components using Jest ? React is a frontend open-source JavaScript library, used to build interactive User Interfaces. React is focused on Single Page applications and is more popularly known as a SPA. Testing is an important aspect of development. It examines whether the application is behaving as intended, and protects i
6 min read
How to tell ReactJS to build project in Production mode ? React production build creates minified bundles, lighter-weight source maps, and optimized assets. This improves the load time. React recommends using production mode while deploying the React app. We now know that production build helps in optimizing performance. React.js provides a powerful and e
3 min read