0% found this document useful (0 votes)
26 views6 pages

Practical 4

Uploaded by

cassalfx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views6 pages

Practical 4

Uploaded by

cassalfx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Practical: 4

Aim: Installation and create a new React App from Scratch

Facebook developed React JS. React.js is an open-source component-based front-end


JavaScript library. It is used to create fast and interactive user interfaces for web and mobile
applications.

It is easy to create a dynamic application in React because it requires less coding and offers
more functionality. It is used by big MNCs and fresh new startups.

Features of React:

 Reusable Components: A single React app consists of many components


each component has its own logic and code but we can easily reuse
components any number of times hence reducing the developer's time and
increasing the efficiency of work.
 Debugging: React app can be easily debugged using “react developer tools”.
It’s a browser extension that can be used for both Chrome as well as
Firefox.

Installation React.js on Windows:


Step 1:

Install Node.js installer for Windows. Once downloaded open NodeJS without disturbing
other settings, and click on the Next button until it’s completely installed.

Install the 14.18.1 LTS


Practical: 4
Aim: Installation and create a new React App from Scratch

Step 2: Open the command prompt to check whether it is completely installed or not type the
command –>

node -v

If the installation went well it will give you the version you have installed.

Now, Check whether the node package manager is installed completely or not, to check npm is
installed or not you have to type the command:

npm -v It will give you npm version which is installed on your device.

Create a new React App npm


 install -g create-react-app
Practical: 4
Aim: Installation and create a new React App from Scratch

Installation will take a few seconds It will globally install the react app for you.

 To check everything went well run the command create-react-app --version

version 4.0.3

If everything goes well it will give you the installed version of the React app.

Step 4: Now Create a new folder where you want to make your react app using the below
command:

Move inside the same folder using the below command:


cd new folder (your folder name)
Practical: 4
Aim: Installation and create a new React App from Scratch

Step 5: Now inside this folder run the command –>

create-react-app react first YOUR_APP_NAME

 It will take some time to install the required dependencies NOTE:

Due to npm naming restrictions, names can no longer contain capital letters, thus type your app’s
name in lowercase.
Practical: 4
Aim: Installation and create a new React App from Scratch

Step 6: Now open the IDE of your choice for Visual Studio code and open the folder where you
have installed the react app new folder inside the folder you will see your app’s name reactapp (In
our example). Use the terminal and move inside your app name folder.

Use the command cd reactapp (your app name)

Step 7: To start your app run the below command:

npm start
Practical: 4
Aim: Installation and create a new React App from Scratch

Once you run the above command a new tab will open in your browser showing the React
logo as shown below:

You might also like