How to Install React Native on Windows

 

1. Prerequisites

Software requirements
To efficiently install and set up React-Native on your Windows device, you will need to install the following:

Android Studio
Android SDK
Install JDK
Node Js
NPM 3.5.2
React native cli

2. Installation procedure

Step-1: Install Chocolatey
The first process that you need to do is to install Chocolatey, a well‐known package manager for Windows. Installation of Chocolatey requires administrator access to the computer’s command prompt to run.

  • Go to and choose the option – get started.

nstall React Native on Windows

  • In the Chocolatey install section, choose Individual as shown:

nstall React Native on Windows

  • Now go to Windows CMD Shell, and enter the following command in the cmd.exe shell

The installation will look like as shown below:

To check whether you have installed it correctly, open the command prompt and type;

choco -version 

If you managed a correct installation, this command returns the Chocolatey version you have installed; like shown in the screen below:



Step-2: Install Node Js
Using Chocolatey we will now install Node.js, and JDK8 as follows.

i. Installing Node Js

Installing Node.js is crucial as it is a JavaScript runtime environment and React Native uses it build the JavaScript code. To install Node.js, you need to open the command prompt as the administrator and put in the Chocolatey command prompt below:

Choco install -y nodejs.install

 

Installation may take some time. Once done, you will see a message stating that Chocolatey is installed as shown below:

 

To confirm that installation has been successful, we will execute the below command at the command prompt, as administrator:

node –version

If the installation was successful, the version number is displayed.

 

After installing Node.js, the Node Package Manager NPM automatically installs. Now check the installation of NPM in your system by entering the following command.

npm –version

The displayed message below verifies that the installation of NPM is successful.

 

Step:4 Installing JDK11 (Java Development Kit)

JDK11 is crucial in the improvement of android applications by React-Native. To install the JDK11, go to the Windows PowerShell and use the following command:

choco install -y nodejs.install openjdk11

To know whether it installed successfully, open the command prompt again and enter the command:

java -version

The message below is displayed if the JDK8 is successfully installed hence showing the Java version as:

openjdk version “1.8.0_222”
Copy Code
The installed JDK8 also has an installed Java compiler. To confirm whether the Java compiler has been installed, open the command prompt and enter the below command:

javac -version

 

Step-5: Install Android Studio

To improve mobile applications with React Native, you need to install Android Studio. To download the installation file, go to. By default, android studio automatically installs the latest Android SDK. However, building a React Native app with native code demands Android 11.0 (R) SDK in particular.

The installation display message looks like below:

nstall React Native on Windows