Open In App

How to check the version of React native ?

Last Updated : 27 Jan, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

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:

  1. Using Terminal
  2. Using npx
  3. Using package.json
  4. Using the info option

Before that let’s initiate a new project for the demo.

react-native init NewProject

Using Terminal: On the terminal/command line, go to the react native project directory. We can use any of these commands to know the react native version and they will give the same output:

react-native --version
react-native --v
react-native -v
react-native -version

Note: It outputs two things, a version of react-native-cli and react-native.

Using npx: NPX is npm package runner that without installation, can execute any package from the npm registry.

Go to the react native project directory on the terminal and run:

npx npm view react-native version

It shows the react native version of the current project directly:

Using package.json: The data containing information about the project is automatically stored in package.json file in the project folder. Upon opening this file, we can see the react-native version.

Using the info option: The info gives the information about react native environment and system, libraries information including the react native version. To see the info use this command in the terminal in the project folder.

react-native info

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads