What is React Native?
- Entire Virtual DOM gets updated.
- Virtual DOM gets compared to previous version.
- Figures out which objects have been changed or different.
- The changed objects, and the changed objects only, gets updated to the DOM.
Best of React Native
React Native Architecture
Setting up React Native Project
If you are already familiar with mobile development, you may want to use React Native CLI. It requires Xcode or Android Studio to get started. If you already have one of these tools installed, you should be able to get up and running within a few minutes. If they are not installed, you should expect to spend about an hour installing and configuring them.
We have two ways to setup in this tutorial we will setup with REACT NATIVE CLI other way is with the help of expo which will check next tutorial.
Run the following command in terminal
brew install node
brew install watchman
Install node if it is not installed in your system. Node version should be greater than 8.3 or latest. Below is the command to check the installed node version.
If it works then great, Else download from https://nodejs.org/en/download/
That’s it. If you have setup the environment successfully then run the below command to get started with your first project.
npx react-native init FirstProject
This command will create your first react project which can be run by the following command.
npx react-native start
react-native run-ios — simulator="iPhone X"
Thanks for reading, will discuss more in details later in the next blog that how React native works like charm as a native application. Which is better native or React Native and why?