How to Check React App Version?

How to Check React App Version?

How to check react version; In this easy tutorial, You will learn very easy ways to check the version of React App.

To check the installed react app version is a very common thing. Because there are many ways or methods to check the version of React App. And this tutorial will show you about those methods only. With which you can easily check the version of your installed react app.

The List of Methods to Check React App Version

You can see various very easy ways or methods. With which you can check the version of your installed react app:

  • 1 Method – To Check React Version using directly visiting the package.json
  • 2 Method – To Check React Version by visiting the react.development.js
  • 3 Method – To Check React Version using App.js
  • 4 Method – To Check React Version using Command Line

1 Method – To Check React Version using directly visiting the package.json

The first method is very easy. For this, you just have to open the package.json file. And that you can see the version of your React app:

{
  ...
  ...
  ...
  "name": "react-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.5.0",
    "@testing-library/user-event": "^7.2.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-scripts": "3.4.1"
  },
  ...
  ...
  ...
}

2 Method – To Check React Version by visiting the react.development.js

The second method is also similar to the first method is very easy. For this you just have to open react.development.js file. Which you will find inside node_modules/react/cjs/ directory. And you can check the version of your react app here:

/** @license React v16.13.1
 * react.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

3 Method – To Check React Version using App.js

The third method is a little different. In this you have to open app.jsfile. Which you will find inside the Src directory. And then you have to add the following code to your app.js file:

import React from 'react'

function App() {
  return (
    <div className="App">
        Here is the Latest React version: <strong>{React.version}</strong>
    </div>
  );
}

export default App;

After this, you have to go to the terminal and execute the command given below. Which will start your React JS app:

npm start

4 Method – To Check React Version using Command Line

The fourth way is very simple. Only you have to go to terminal and visit your react app by using cd /path/your_react_name command.

And when you will be in your react app directory on the terminal. So you execute the command given below. With this you can check the version of your React app:

npm view react version

Now you will see the version of React app installed on your terminal.

Recommended React Posts

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Node JS, Express JS, Vue JS, Angular JS, React Js, MySQL, MongoDB, REST APIs, Windows, Xampp, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL and Bootstrap from a starting stage. As well as demo example.

Leave a Reply

Your email address will not be published. Required fields are marked *