Hello,
Recently in projects we decided to use React Native to create cross platform mobile application. I faced some difficulties in installing so here in this blog I will explain getting started with React Native and create cross platform mobile application.
What is React Native?
It lets you build mobile apps using only JavaScript. It uses the same design as React, letting you compose a rich mobile UI from declarative components. With React Native, you don’t build a “mobile web app”, an “HTML5 app”, or a “hybrid app”. You build a real mobile app that’s indistinguishable from an app built using Objective-C or Java. IT uses the same fundamental UI building blocks as regular iOS and Android apps. You just put those building blocks together using JavaScript and React.
1) Install Xcode and Xcode command lines tools.
Get Xcode from Mac App Store. Click Here
2) Install Xcode Command Line Tools, Open terminal and run following command.
xcode-select –install
3) Install Homebrew, Homebrew is a package manager to install missing package on OSX. Open terminal and run following command.
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
4) Install NodeJs and NPM. React comes package in NPM so we have to install it. Run following command in terminal
brew install node
After installation check with following command to see if it’s installed.
node -v
npm -v
5) Install watchman with home brew.
brew install watchman
6) Install The React Native CLI
Node.js comes with npm, which lets you install the React Native command line interface.
Run the following command in a Terminal
npm install -g react-native-cli
7) Create Project, run following commands in terminal.
react-native init ReactNativeTest
cd ReactNativeTest
Now run it with following command.
react-native run-ios
It will run application in iOS simulator.
react-native run-ios is just one way to run your app. You can also run it directly from within Xcode.

