First, this is very important, please make sure you have already installed and run the simulator successful base on this guide – https://facebook.github.io/react-native/docs/getting-started.html. It will help you install and build your first Example React Native app.
To get started with React Native project you have to install some tools, dependencies, and applications as follows:
Node and Watchman: This can be installed via the command line.
React Native command line interference: This can be installed via the command line.
Xcode: This can be downloaded from Mac App Store.
Android Studio: This can be download from the official website of Android.
Node Package Manager: This can be installed via command line in the project’s main file.
React Native code can be edited using any known text or code editor. Here is a list of recommended code editors:
Atom Editor: A free and open source tool with awesome features. Download here
Nuclide: Is built as a single package on top of Atom to provide hackability and the support of an active community. Download here
You are required to download an IDE to open the project’s source code and start editing it. Many free IDEs are available for free and paid IDEs would definitely have extra features.
We felt very comfortable with Visual Studio Code and it was used for building this project.
Installing Tools, Dependencies and Applications:
You will need Node, Watchman, the React Native command line interface, Xcode and Android Studio to run the app in iOS and Android simulators:
1. How to install Node and Watchman?
To install node and watchman, run below commands respectively in your terminal:
brew install nodebrew install watchman
2. How to install React Native command line interface:
To install the React Native command-line utility, run the below command in your terminal:
npm install -g react-native-cli
3. How to install Xcode (for Mac only)?
You need to download XCODE to build apps for iOS. To download XCODE in your Mac, visit the following URL:
4. How to install Android Studio?
You need to download Android Studio to build apps for Android. To download Android Studio in your workstation, visit the following URL:
5. How to install Genymotion free?
To build your app in Android emulator, please also install the Genymotion free version from the following URL:
6. How to install the Node Package Manager (NPM) in the project folder?
You have to go the main files folder and install the NPM as follows :
Once you are in the folder, install the NPM by running the following command and using sudo:
$ sudo npm install
Upon completing all the above steps, you will be able to build the app in iOS or Android simulator. Details about how to build the app for iOS and Android is mentioned in upcoming sections of this documentation.