Categories
React Native

Getting Started with React Native 0.59

React Native is an open-source , cross platform mobile application framework created by Facebook. It is used to publish Apps for Android, iOS and UWP. This tutorial focuses on how to install react native on windows.

The react-native documentation is the best place to get started. but I’ll be giving you a quick starter guide with easier steps and more detail.

Before installing react native. Make sure to install these on your PC

  1. Node.js : npm is the package manager for the Node JavaScript platform. It is used to install node programs.
  2. Java Runtime Environment : The Java Runtime Environment (JRE) is a combination of tools for development of Java applications. It combines the Java Virtual Machine (JVM), platform core classes and supporting libraries.
  3. Android Development Environment : Android SDK(Software Development Kit) that enables developers to create applications for the Android platform.

Install react-native-cli by heading over to your terminal and type the following command

npm install -g react-native-cli

Starting a new application

Now that we have completed all the basic setup to start react native application. Let’s initiate the Project.

react-native init ReactNativeProject

After initiating the project. Type the following command to get into the project directory

cd ReactNativeProject

Finally, You are ready to run your project in both android and iOS (A Mac PC is required to build projects with native code for iOS).

Type the following command in your terminal to run for iOS
react-native run-ios
Type the following command in your terminal to run for Android
react-native run-android

The build process may vary every time you run the project.The launch packager will show the process status of the build.If the build fails, It wil indicate the errors.

Feel free to drop your thoughts at the comment section!