Open Source is king!



how to install and setup react native on ubuntu 22.04

react-native

What is a React Native ?

React Native is an open source platform for developing native mobile applications; it was developed largely by a team at Facebook.

You can design user interfaces for both iOS and Android platforms using  React Native Framework.

React Native components can be used in both Android and iOS apps because  they have reciprocal rights.

You can use Cordova-based code with the plugin or integrate REACT Native components into the  code of an existing application. However, your current app needs to generate  Cordova and Ionic code.

React Native development is comparatively simple, quick, and effective.


Software Requirements
Andoid Studio / VS code
Android SDK
Install JDK
Node JS
NPM
React Native cli


İnstallations Procedure



Install Node.js and npm



sudo apt update 










#method 1 
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash 
#method 2 
sudo apt-get install -y nodejs


which npm


curl http://npmjs.org/install.sh | sh




Install JDK



sudo apt-get install openjdk-8-jdk
sudo apt-get update 
sudo add-apt-repository ppa:maarten-fonville/android-studio

Installing Android Studio



sudo apt update 
sudo apt install android-studio






sudo nano $HOME/.bash_profile




export ANDROID_HOME=$home/Andriod/Sdk
export PATH=$PATH:$ANDOID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/Platform-tools


Install Watchman



git clone https://github.com/facebook/watchman.git
cd watchman 
git chechkout v4.9.0 
./autogen.sh 
./configure 
make 
sudo make install 


Install Flow



wget https://github.com/facebook/flow/releases/download/v0.62.0/flow-linux64-v0.62.0.zip 
unzip flow-linux64-v0.62.0.zip 
cd flow 
sudo mv flow /usr/local/bin/flow


Install React Native



sudo npm install -g react-native-cli 


Create a New Project


react-native init newapp
cd newapp 
react-native run-android