How To Install And Setup React Native On Windows 10

How To Install And Setup React Native On Windows 10

May 30, 2024

React Native is a powerful framework for building cross-platform mobile applications using JavaScript. If you’re a Windows user, follow these steps to set up React Native on your machine:

Installation

1/ Install Chocolatey

Chocolatey

Chocolatey is a package manager for Windows that simplifies software installation. Open a terminal (Windows Command Prompt or PowerShell) and run the following command to install Chocolatey:

choco install chocolatey

2/ Install Node, Python2, and JDK8

React Native requires Node.js, Python2, and JDK8. You can install them using Chocolatey:

choco install nodejs.install python2 jdk8

3/ Install Android Studio

Android Studio

Android Studio is essential for React Native development on Windows. Download and install Android Studio from the official website. During installation, make sure to select the Android SDK components you need.

4/ Set up Android SDK

Android SDK

After installing Android Studio, open it and go to the “SDK Manager.” Install the following components:

  • Android SDK
  • Android SDK Platform
  • Android Virtual Device (AVD)

5/ Install React Native CLI

React Native CLI

Open Command Prompt or PowerShell and run the following command to install React Native globally:

npm install -g react-native-cli

6/ Creating a New Application

  • Connect an Android device to your computer via USB or set up an Android emulator using Android Studio.
  • Make sure USB debugging is enabled on your device.

7/ Running the Application

  1. In the terminal, navigate to the directory where you want to create your project.
  2. Run the following command to create a new React Native project (replace MyApp with your desired project name):
  3. react-native init MyApp

8/ Run Your React Native App

  1. Change into the project directory:
  2. cd MyApp
  3. Start the Metro bundler (JavaScript packager):
  4. npx react-native start
  5. In a separate terminal, build and run your app on the connected Android device or emulator:
  6. npx react-native run-android

That’s it! You’ve successfully set up React Native on Windows 10. Feel free to explore and build your awesome mobile app! 😊

Tip: We recommend using Visual Studio Code as the source-code editor for working with React Native projects.

Leave A Comment

ZiniSoft

Hello! We are a group of skilled developers and programmers.

Hello! We are a group of skilled developers and programmers.

We have experience in working with different platforms, systems, and devices to create products that are compatible and accessible.