Requirements

Project Requirement

First make sure you have installed Visual studio Code node.js 8.X and npm 5.X version. You can check it on own terminal window simply by entering node -v and npm -v . You can also download latest nodeJs from here.

$ npm -v
$ node -v

Make sure you have installed react-native-cli latest release. You can check React Native version in terminal with react-native -v command. If you need more info how to setup react-native project please follow React Native Getting Started at React Native official websites.

React Native CLI

React Native is distributed as two npm packages, react-native-cli and react-native. The first one is a lightweight package that should be installed globally.

 ** $ npm install -g react-native-cli **

Create Project

Create React Native App is the easiest way to start building a new React Native application. It allows you to start a project without installing or configuring any tools to build native code - no Xcode or Android Studio installation required (see Caveats).

Assuming that you have Node installed, you can use npm to install the create-react-native-app command line utility:

** $ npm install -g create-react-native-app **

Then run the following commands to create a new React Native project:

create-react-native-app your-project-name
cd your-project-name
npm start

You can check React Native version:

** $ react-native -v **

Run project in Android:

** $ react-native run-android **

Run project in IOS:

** $ react-native run-ios

React Native target IOS, Android, Window all these three platform so you need to install there respective SDK to make a build.

Last updated