Sagipora Sopore Baramulla 193201 Jammu & Kashmir
Hello and welcome to Codipher. Today we are going to install ReactJS on android device without any errors and then develop complete reactjs app. So without wasting further time let’s get started.
NOTE: If you try to install or create reactjs by changing the directory to /sdcard or /storage in termux, then the installation process will fail. It will give you different errors each time or it may get stuck somewhere. This is because Android device does not meet the requirements for installation of ReactJs. That’s why we will be installing ReactJS in termux home directory.
Also Read: MongoDB Installation And Setup On Android
1) First of all you need to install the Acode Code Editor app on your Android device from the above link.
2) Now install the termux app from above link.
3) When the both apps are installed successfully, open termux app and give it a few seconds for setup.
4) In termux give below commands one by one
pkg update pkg upgrade termux-setup-storage pkg install nodejs
5) Now let’s install reactjs app with create-react-app by this command
npx create-react-app yourAppName
Replace yourAppName with the name that you want to give it. And wait for about 10-15 minutes to finish the installation process. It depends on uour device specifications and internet connection. If you have a high end device and good internet speed it won’t take long to finish.
6) Now the reactjs app has been created. Now we need to start the development server on our localhost:3000, to do that let’s change our present working directory to the ReactJs app we recently created by executing below command.
7) Start the development server on localhost:3000 with below command
npm start or yarn start
Now wait for the development server until it gets started, when it is successful started your default browser will open automatically on http://localhost:3000.
If the browser didn’t opened automatically, then you need to manually open the browser and type http://localhost:3000 in your search bar.
A development server is a sort of server that is designed to help software programmers build and test programmes, websites, software, and apps. It includes a run-time environment as well as the hardware and software utilities required for programme creation and debugging.
This IP address, by default, refers to a server operating on the present device. In other words, your computer is making a request to itself, its “local host,” when it asks the IP address 127.0.0.1. “localhost” is also the domain name for the loopback IP address 127.0.0.1.
That’s it for this article. If you faced any problems while installing reactjs on android, then leave a comment below. I will reply to you ASAP.