Create a Simple ReactJs Application – Part 1

by Aug 4, 2022React JS

ReactJs is one of the famous front-end open-source libraries of JavaScript developed by Facebook. It aims to allow developers to quickly create fast user interfaces for websites and applications. In this blog, we will create a simple and basic ReactJs application. To create this application, one must have enough knowledge of HTML, and CSS, mainly JavaScript. Nevertheless, developing your first application is not much of a complicated task. 

Prerequisites

It is time to check some tools and packages installed on your computer. Node.js and npm are the essential prerequisites for this application, including react tools like create-react-app.

  • node
  • npm
  • create-react-app

Check out some of the basics of Node.js in this following blog post:

NodeJs Tutorial

You can check the version of the packages by entering following commands,

npm -v
node -v

In this tutorial, I am using node package manager version 8.1 and node version, 16.3

Download link for Node.js

Installing create-react-app

Always try to install the latest version of the create react app globally. You can even use yarn for installing react packages. The purpose of this create react app is to provide all the dependencies which is used to create the react js application. this is a tool provided by the react.js developers, use the following command in your cmd terminal to install the tool.

npm install -g create-react-app

After the successful installation of the create react app, now it is time to create your first React.js application.

Creating your first ReactJs application

To create your first ReactJs application, you have to choose your desired location for the application. Open Visual Studio or cmd termal, navigate to your location and type the following command,

npx create-react-app reactapp

You can name the application as per your wish!

Created successfully!!

Run your ReactJs application

After you successfully created your application, open your project (application) directory and check out the files created.

The file structure consists of node_modules, public and a src (source) file. A package and package-lock folder will also be created. Inside the src file, you can find all the Javascript file related to your project. Besides that, in the public file, you can find the HTML file related to the project.

Now it is time to run your application with the follwing command. cd into your application and start your application,

cd reactapp
npm start

Voila!! Your first application compiles successfully, and now you can view your application on your localhost.

By default, the application opens at localhost:3000, but it is possible to modify these port numbers in the port settings later.

Creating a multiplication Skill in Alexa using python

Written By Monisha Macharla

Hi, I'm Monisha. I am a tech blogger and a hobbyist. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning!

RELATED POSTS

Create a Simple ReactJs Application – Part 2

Create a Simple ReactJs Application – Part 2

In the tutorial's last part, we discussed about ReactJs and how to run a simple react app on a web browser. In this part, we will dig more into some interesting stuff, such as creating a home, about us, and contact pages. Click here for the first part - Create a...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....