React Native ( Installation and Prerequisite ) for MacOS
In this blog, we will be looking at what all are the prerequisites and tools that need to be installed for getting started with development using React Native on MacOS.
NodeJS (LTS Recommended)
NodeJS is a javascript runtime environment which we will require throughout our development process.
To check if NodeJS has been installed properly on your Mac, run the following command in the terminal :
node -v
The result of the above command should be like the following :
As long as you can see any version number, you are good to go. The number need not be the same as above as NodeJS keeps on updating.
-
Visual Studio Code (VS Code) is a simple, free yet powerful code editor by Microsoft which is used for structuring and editing our code. We will be using it as our choice of code editor since the majority of people are familiar with it. It also comes with an inbuilt terminal which makes our life easy.
As shown above, you can install VSCode according to your chip (Intel/Apple)
Java (Open JDK)
We will also need JDK(Java Development Kit) since we are developing apps for mobile devices.
You can install Open JDK by running the following commands in the terminal :
brew tap homebrew/cask-versions brew install --cask zulu11
Note: You need to have homebrew installed on your Mac for running the above commands. The following article can be followed for installing homebrew on your system if you don't have it already.
You can verify the JDK installation by running the following command :
java --version
The above command should give results like the following :
The version number may vary based on when you are reading the article
-
Don't worry if you are using a low-end laptop/PC, we won't be using Android Studio for its AVD (Android Virtual Device). Instead, we will be installing it because of the tools that it brings along i.e. ADB( Android Debug Bridge ) which is required for mobile app development. We just need to install it (No need to even open it)
We will be using a physical smartphone connected to our system to see the output of our code.
As shown below, download android studio based on your chip (Intel/Apple)
XCode (Optional)
If you want to test your app for iOS devices then you can also install Xcode.
Xcode can be downloaded from the Apple App Store.
This article is based on the video "Prerequisite and installation of React Native" by Hitesh Choudhary from his React Native series on youtube :