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
- 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: –
# 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: –
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: –
- In addition, you will find a folder named after your project, which contains the project files, as the file structure below.
- 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
- 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.