React.js is one of the most popular JavaScript libraries in India. Whether you are a student learning web development, a freelancer building apps, or working in a startup on MERN stack projects, knowing your React version is very important. Different versions have new features, hooks, performance improvements, and security updates.
Follow these step-by-step instructions to find the installed React version in your project. These methods work on most operating systems, including Windows, macOS, and Linux.

Why Should You Check React Version?
- Ensure compatibility with libraries like React Router, Redux, Material-UI, or Next.js.
- Know if you can use latest features (like React 19 features in 2026).
- Fix errors like “Hooks can only be called inside the body of a function component”.
- Prepare for interviews — “How do you check React version?” is a common question.
- Decide when to upgrade your project.
Current stable version (as of 2026) is React 19.x, but many projects still run on React 18.
1. Check React Version Using Terminal/Command Prompt (Fastest)
Method A: Using npx
- Open Terminal (Ubuntu/Linux/macOS) or Command Prompt (Windows).
- Navigate to your React project folder: Bash cd my-react-app
- Run this command: Bash npx react –version
or
Bash npx react -v
You will see output like: 18.3.1 or 19.0.0
Method B: Using npm or yarn
Bash npm list react
or
Bash yarn list react
For global version (if installed globally — rare):
Bash npm list -g react
2. Check React Version in package.json File
This is the simplest and most reliable method.
- Open your React project folder.
- Open the file named package.json (using VS Code, Notepad, or any editor).
- Look under “dependencies” section:
JSON
“dependencies”: { “react”: “^18.3.1”,
“react-dom”: “^18.3.1”
}
- The number after “react”: is your React version.
- ^ means it can update to minor versions automatically.
Pro Tip: Also check react-dom and react-scripts versions.
3. Check React Version Inside Your Running App
Add this temporary code to see the version while the app is running.
In any component (for example App.js):
jsx
import React from ‘react’;
function App() {
console.log(‘React Version:’, React.version);
return <h1>Hello World</h1>;
}
export default App;
- Save the file.
- Run the app: Bash npm start
- Open browser console (Press F12 → Console tab). You will see the React version printed.
4. For Create React App (CRA) Projects
Most beginners in India start with Create React App.
Run: Bash npm list react-scripts
This shows the version of the tool used to create the app, which is closely related to React version.
5. Check Version in Next.js Projects
If you are using Next.js (very popular now): Bash npm list next
or check package.json for “next” version. React version is usually mentioned in dependencies.
6. Check React Version Using VS Code or Other Editors
- Open your project in VS Code.
- Press Ctrl + Shift + P (Command + Shift + P on Mac).
- Type “React” and look for extensions like “React Version” or simply open package.json.
Many developers use the ES7+ React/Redux extension which sometimes shows version info.
Common Issues & Troubleshooting
- “react: command not found”: Make sure you are inside the project folder and node_modules is installed. Run npm install first.
- Multiple React versions: Sometimes npm ls react shows duplicates. Fix with:
Bash - npm dedupe
- Permission error on Linux: Use sudo only if necessary, or fix permissions with npm cache clean –force.
- Old project: Many college projects still use React 16 or 17. Upgrade carefully using official React docs.
- Yarn users: Prefer yarn why react to see why a particular version is installed.
Extra Tips for Users
- Students & Beginners: Start with latest React using:
Bash - npx create-react-app my-app
- Then check version immediately.
- Freelancers: Always mention the React version in your project documentation or client handovers.
- Interview Preparation: Practice commands like npx react –version and explain the difference between React and ReactDOM.
- Performance: React 18+ has great improvements in Concurrent Mode and Suspense. Upgrade when possible.
- Learning Resources: FreeCodeCamp, CodeWithHarry, Thapa Technical, and official React docs (very popular among developers).
- Version Control: Always commit package.json and package-lock.json in Git.
- Upgrading React:
Bash - npm install react@latest react-dom@latest
- Test your app thoroughly after upgrade.
- Tools: Use npm outdated to see which packages (including React) need updates.
Conclusion
Checking the React version is very easy. The quickest methods are:
- npx react –version
- Open package.json file
- npm list react
Save this article or take screenshots of the commands. Keeping your React version updated helps you build modern, fast, and reliable web applications.
Whether you are preparing for campus placements, working on client projects, or learning full-stack development, knowing these simple commands will save you time and boost your confidence.
Share this guide with your classmates, friends in WhatsApp groups, or junior developers. Happy coding!
Note: Commands are current as of 2026. Always refer to the official React documentation (react.dev) for the latest upgrade guides and version-specific information.