Learn how to install React Native on a Mac or Windows machine and create a new project. This guide covers the necessary steps to set up a development environment and run a React Native app on an iOS simulator or Android emulator.
React Native is a popular framework for building native mobile applications using JavaScript. It allows developers to build mobile apps that are indistinguishable from apps built using Objective-C or Java, the native programming languages for iOS and Android, respectively.
If you want to learn Ionic Framework check out Ionic Tutorials.

Installation of react native on a Mac
- First, make sure you have the latest version of Node.js and Watchman installed on your machine. You can download the latest version of Node.js from the official website (https://nodejs.org/) and install it using the default installation options. Watchman is a file-watching service that can be installed using Homebrew. To install Watchman using Homebrew, open a terminal window and run the following command:
brew install watchman
- Next, install the React Native command-line interface (CLI) using the following command:
npm install -g react-native-cli
- Once the React Native CLI is installed, you can create a new React Native project using the following command:
react-native init MyProject
This will create a new directory called “MyProject” with the basic structure of a React Native project.
- To run your app on an iOS simulator, you will need to have Xcode installed on your machine. Xcode is a development environment for building iOS and macOS apps. You can download Xcode from the Mac App Store.
- Once you have Xcode installed, navigate to the root directory of your project and run the following command:
react-native run-ios
This will build and run your app on the iOS simulator.
Installation on Windows
- First, make sure you have the latest version of Node.js and Python2 installed on your machine. You can download the latest version of Node.js from the official website (https://nodejs.org/) and install it using the default installation options. Python2 is required for building some of the native modules for React Native.
- Next, install the React Native command-line interface (CLI) using the following command:
npm install -g react-native-cli
- Once the React Native CLI is installed, you can create a new React Native project using the following command:
react-native init MyProject
This will create a new directory called “MyProject” with the basic structure of a React Native project.
- To run your app on an Android emulator, you will need to have Android Studio installed on your machine. Android Studio is a development environment for building Android apps. You can download Android Studio from the official website (https://developer.android.com/studio).
- Once you have Android Studio installed, navigate to the root directory of your project and run the following command:
react-native run-android
This will build and run your app on an Android emulator.
I hope this helps! Let me know if you have any questions.