Thursday , January 13 2022

React Native for Android Tutorial for Beginners – Android Coding by DMTechnolab

React Native is a framework used to create native apps using React. Apps built on native feedback will work on both Android and iOS, which perform better than hybrid apps, which are almost closer to native apps. But here we will focus Reactive Native for Android. For those switching from Android to React-Native, keep in mind that React-Native has nothing to do with Java and XML. It is all about JavaScript and it is libraries.

Everything from designing the UI to various screens and backend manipulations will be done in JavaScript. If you don’t know JavaScript, don’t be disappointed. It is quite easy and you will learn it as a series of reaction-basics.

In short, React-Native is an efficient way to develop applications with optimal performance and compatibility across multiple platforms. This is about the first post Reactive Native for Android. We will keep learning it in upcoming posts. So let’s start by establishing an environment of development.

Environmental Setup for Reactive Native

To set up a work environment for React-Native, we need to create a bunch of installations as follows:

# 1 Installing Java Development Kit (JDK)

  • If you already have JDK installed on your system, you can skip this step.
  • JDK is required to use android studio on its system to make its system Java literate.
  • To install it, Download jdk Setup and then install after downloading it.

# 2 Installing NodeJS

  • Node JS is required to use JavaScript code outside the browser environment. This creates the application package for our JavaScript code.
  • Go to install node.js This link And download setup NodeJS. Once downloaded, install it.
  • Confirm installation after install. To do this, open a command prompt and type the command Node -v And it will show you the version NodeJS Installed on your system as shown in the image below: –

Native response for androidNative response for android

# 3 Installing Python

  • To install python, download setup from here Python. And as soon as you install every other app, install it.

# 4 Installing Android Studio

  • Assuming that you already have Android Studio on your system, let’s go ahead with the remaining installations.

# 5 Installing React Native CLI

This includes the installation of the React-Native command line tool. These are required to construct a new project and then to debug the project. to do this,

  • Open the command prompt and type npm install -g response-native-cli
  • On successful installation, you will see a screen as shown below: –

Native response for androidNative response for android

Oh! That is the matter. All the necessary installations have been done.

Construction of first reactive native project

To create a new project in React Native, follow the steps below

  • Open a command prompt and change the directory where you want to store your project.
  • Type the command Response-origin init yourprojectname.

It is going to take some time to build this project.

  • After this process is successful, you will see the screen as shown below: –

Native response for androidNative response for android

  • In addition, you will find a folder named after your project, which contains the project files, as the file structure below.

Native response for androidNative response for android

  • In the above image, you will see two files named index.android.js and index.ios.js. These are files in which most engineering is done to create apps.
  • Assuming that you already have an emulator to test apps, let’s move on to running our first React-Native project.
  • If not, go and complete it. There are many tutorials available for this.

Running your first React Native for Android project

  • Now that you have your project ready for the first run, open a command prompt and navigate to your project’s folder in the command prompt.
  • To run the project in Android, type the command React-native run-android
  • To run the project in iOS, type the command Reaction-native run-iOS, assuming that you have Mac and iPhone simulator installed (but if you don’t have a Mac, don’t worry we mainly do Android stuff Are.).
  • Once the project is successfully compiled, you will see a screen as shown below

Native response for androidNative response for android

  • Hooray! You have successfully set up the work environment for native feedback.

So this is for starters Reactive Native for Android. In the next part, we learn about the project structure of React-Native, React-Native projects, the layout elements in React-Native and the IDE for rendering them. so stay tuned!

Hope you have successfully created an environment for React-Native. If not, feel free to share the difficulties encountered in this course.

Hello, I am Manish Kumar. I am a student of B.Tech in NIT Jamshedpur. Fortunately, I find myself quite passionate about computers and technology. Android is my most recent crush.


Source link

About dmtechnolab

Check Also

Simplified Coding

Android Espresso Tutorial – Testing Fragment in Isolation – Android Coding by DMTechnolab

Welcome to another tutorial in the Android test series. And this post is called Android …

One comment

  1. You actually make it seem so easy with your
    presentation but I find this matter to be actually something which I think I would never understand.
    It seems too complex and extremely broad for me.
    I’m looking forward for your next post, I’ll try to
    get the hang of it!

Leave a Reply

Your email address will not be published. Required fields are marked *