Welcome to React Native 101, your comprehensive guide to getting started with React Native development! This repository serves as a beginner-friendly resource for those interested in building powerful cross-platform mobile applications using React Native.
In this guide, we'll cover the fundamentals of React Native, including setting up your development environment, understanding the core concepts of React Native, and building your first React Native app from scratch. Whether you're a seasoned JavaScript developer or new to mobile development, this repo will provide you with a solid foundation to start building robust, native-like apps for iOS and Android.
1) NodeJS : It is the root of any React projects, so make sure you should have installed it in your system.
Recommended : use LTS version for better support.
2) OpenJDK / JDK : React Native have some dependencies which also includes Java Development kit (JDK).
Link : https://learn.microsoft.com/en-us/java/openjdk/download#openjdk-11
Here you can check the version compatibility : https://docs.gradle.org/current/userguide/compatibility.html
Link: https://developer.android.com/studio
Answer is NO ! , we are not going to open Android studio for ReactNative, we will be doing all the programming related to React Native inside our Vscode.
Do this Steps :
Inside the SDK Platforms tab , Make sure that Android SDK Platform 34 , Android SDK Platform 33, Google APIs intel x86_64 Atom System image or intel x86_64 Atom System image is selected.
Go to SDK Tools
and select the versions : 33.0.0
, 33.0.2
, 30.0.3
Now , there will be 2 preferences : Either you want to use directly the app inside your computer ( using Virtual Device Emulator ) or by attaching the Smartphone( android or IOS ) to the System.
-
Type this Command on your Command prompt (cmd) or in Vscode Terminal but before that create a folder where you want to create React native apps.
npx react-native init <yourProjectName> // dont include <> this brackets.
-
Install React Native Doctor : This will help you to find and fix the issues related to installation and checking the dependencies.
npx @react-native-community/cli doctor
-
To run the React Native Application , simply type :
cd <yourProjectName>
then run this command :npx react-native run-android
So , it will build some of its files before actually deploying the app to your smartphone. Once everything is done , it will look like :