Firstly, you’ll need to install the node on your machine. Download the latest node js and install it.
confirm node and npm are installed by typing the below commands
Now, you can install react native by typing the following command in the terminal.
npm install -g react-native-cli
Android studio allows to run the react native app in an emulator to test the app.
To run the react native app in emulator you require to setup the ANDROID_HOME environment variable to Computer → Advanced System Settings → Environment variables → New, then enter the path to your Android SDK.
Now you can create your first project by running the below command in the terminal from the folder where you want to create the app.
react-native init FirstReactApp
run the command to start package, make sure you started the emulator.
The sample project will be open in the emulator.