SlideShare a Scribd company logo
How to install
Reactjs in windows
Hope Tutors
In this article we are going to discuss about the installation setup for React JS in
windows environment. We just need NodeJS for installing this. Once we done with
the installation of NodeJS we can able to install React JS using NPM. This is possible
in 2 ways. They are,
• webpack & label.
• create-react-apps command.
Now, in this article the first method is discussed in detail.
Using the Webpack & Label:
In general, we say webpack as module bundler. It takes
modules which are dependent and compile it to one
bundle. Generally, we use this in developing the app
with the help of command line. This is also possible by
configure this using the webpack.config.files.
In general Babel is known as JavaScript compilers &
transpiler. We use it for converting source code from one
to other. With the help of babel, we can use ES6 new
feature in our code, babel generally convert this code as
ES5. So that we can run this code on any browser.
1st Step:
Creating Root folders:

First of all, we need to create a new folder in our desktop and name it as
reactapps. This is used for installing all the needed files. This is possible with the
help of the command mkdir.
For creating any modules we must need to generate package.json. Once we
create the folder, just we also need to create this packaage.json. For this we want
to run command npm init in command prompt.
D:UsersusernamesDocument>mkdir reactApps>npm init
This npm init will ask you about the module information. We can able to skip this
by the option -Y.
2nd Step:
Installing the React & React dom:
Our main aim is to install the ReactJS along with its dom package. This is simply
possible with the help of the commands install react & react-dom. We can able to add
whatever package we install to the package.json. This is possible by using the option –
save.
Or we can also achieve this in one command. The command is as follows,
3rd Step:
Installing the webpack:
 Generally, we use the web pack for generating
the bundler. For this we have to install web
pack. Also, we have to install the webpack -
dev-server as well as webpack-cli. This is
possible using the following command lines.
They are as follows,
Or we can also achieve this in one command
line. The command line is as follows,
4th Step:
Installing the babel:
 We have to also install the following. They are,
• Babel.
• Babel loaders.
• Babel core plugins.
• Preset env of babel.
• Preset react of babel.
• HTML web pack plugins.
This is possible using the following command lines. They are as follows,
Or we can also achieve this in one command line. The command line is as follows,
5th step:
Creating Files:
 To complete installation process create the
following files.
1. webpack.config.js
2. main.js
3. index.html
4. App.js
5. .babelrc
6th Step
Setting loader, server and compiler
In this step, please add the below code. In this example, the development server port is 8001. You can choose your own port number.
const path = require(‘path’);
const HtmlWebpackPlugin = require(‘html-webpack-plugin’);
module.exports = {
entry: ‘./main.js’,
output: {
path: path.join(__dirname, ‘/bundle’),
filename: ‘index_bundle.js’
},
devServer: {
inline: true,
port: 8001
},
module: {
rules: [
{
test: /.jsx?$/,
exclude: /node_modules/,
loader: ‘babel-loader’,
query: {
presets: [‘es2015’, ‘react’]
}
}
]
},
plugins:[
new HtmlWebpackPlugin({
template: ‘./index.html’
})
]
}
In package.json, delete “test” because no test is done.
7th step:
Update index file
There are two tasks
1. Update div id as “app”.
2. Add “index_bundle.js”.
8th Step:
Add App.js and main.js
Add the following files
Main.js
Please create a new file called .babelrc
9th Step:
In this step, please start the npm with command “npm start”.
create the bundle “npm run build”

More Related Content

What's hot

#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
Hanoi MagentoMeetup
 
Creating a full stack web app with python, npm, webpack and react
Creating a full stack web app with python, npm, webpack and reactCreating a full stack web app with python, npm, webpack and react
Creating a full stack web app with python, npm, webpack and react
Angela Kristine Juvet Branaes
 
Using WebSockets with ColdFusion
Using WebSockets with ColdFusionUsing WebSockets with ColdFusion
Using WebSockets with ColdFusion
cfjedimaster
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulp
Eli McMakin
 
How to install wordpress on wampserver
How to install wordpress on wampserverHow to install wordpress on wampserver
How to install wordpress on wampserver
shreyakp
 
Webpack DevTalk
Webpack DevTalkWebpack DevTalk
Webpack DevTalk
Alessandro Bellini
 
Yeoman
YeomanYeoman
Yeoman
James Cryer
 
Webpack
Webpack Webpack
Webpack
DataArt
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
Simeon Prusiyski
 
How To Install Apache, MySQL & PHP on Windows Vista
How To Install Apache, MySQL & PHP on Windows VistaHow To Install Apache, MySQL & PHP on Windows Vista
How To Install Apache, MySQL & PHP on Windows Vista
Mochamad Yusuf
 
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
BaláZs Ree   Introduction To Kss, Kinetic Style SheetsBaláZs Ree   Introduction To Kss, Kinetic Style Sheets
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
Vincenzo Barone
 
Advanced front-end automation with npm scripts
Advanced front-end automation with npm scriptsAdvanced front-end automation with npm scripts
Advanced front-end automation with npm scripts
k88hudson
 
How to install and configure LEMP stack
How to install and configure LEMP stackHow to install and configure LEMP stack
How to install and configure LEMP stack
RootGate
 
Production optimization with React and Webpack
Production optimization with React and WebpackProduction optimization with React and Webpack
Production optimization with React and Webpack
k88hudson
 
Nightwatch.js (vodQA Shots - Pune 2017)
Nightwatch.js (vodQA Shots - Pune 2017)Nightwatch.js (vodQA Shots - Pune 2017)
Nightwatch.js (vodQA Shots - Pune 2017)
Smriti Tuteja
 
webpack 101 slides
webpack 101 slideswebpack 101 slides
webpack 101 slides
mattysmith
 
Angular2 ecosystem
Angular2 ecosystemAngular2 ecosystem
Angular2 ecosystem
Kamil Lelonek
 
007. Redux middlewares
007. Redux middlewares007. Redux middlewares
007. Redux middlewares
Binh Quan Duc
 
Your own minecraft server on a linode vps
Your own minecraft server on a linode vpsYour own minecraft server on a linode vps
Your own minecraft server on a linode vps
Cleo Morisson
 
Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)
Conrad Cruz
 

What's hot (20)

#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
 
Creating a full stack web app with python, npm, webpack and react
Creating a full stack web app with python, npm, webpack and reactCreating a full stack web app with python, npm, webpack and react
Creating a full stack web app with python, npm, webpack and react
 
Using WebSockets with ColdFusion
Using WebSockets with ColdFusionUsing WebSockets with ColdFusion
Using WebSockets with ColdFusion
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulp
 
How to install wordpress on wampserver
How to install wordpress on wampserverHow to install wordpress on wampserver
How to install wordpress on wampserver
 
Webpack DevTalk
Webpack DevTalkWebpack DevTalk
Webpack DevTalk
 
Yeoman
YeomanYeoman
Yeoman
 
Webpack
Webpack Webpack
Webpack
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
 
How To Install Apache, MySQL & PHP on Windows Vista
How To Install Apache, MySQL & PHP on Windows VistaHow To Install Apache, MySQL & PHP on Windows Vista
How To Install Apache, MySQL & PHP on Windows Vista
 
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
BaláZs Ree   Introduction To Kss, Kinetic Style SheetsBaláZs Ree   Introduction To Kss, Kinetic Style Sheets
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
 
Advanced front-end automation with npm scripts
Advanced front-end automation with npm scriptsAdvanced front-end automation with npm scripts
Advanced front-end automation with npm scripts
 
How to install and configure LEMP stack
How to install and configure LEMP stackHow to install and configure LEMP stack
How to install and configure LEMP stack
 
Production optimization with React and Webpack
Production optimization with React and WebpackProduction optimization with React and Webpack
Production optimization with React and Webpack
 
Nightwatch.js (vodQA Shots - Pune 2017)
Nightwatch.js (vodQA Shots - Pune 2017)Nightwatch.js (vodQA Shots - Pune 2017)
Nightwatch.js (vodQA Shots - Pune 2017)
 
webpack 101 slides
webpack 101 slideswebpack 101 slides
webpack 101 slides
 
Angular2 ecosystem
Angular2 ecosystemAngular2 ecosystem
Angular2 ecosystem
 
007. Redux middlewares
007. Redux middlewares007. Redux middlewares
007. Redux middlewares
 
Your own minecraft server on a linode vps
Your own minecraft server on a linode vpsYour own minecraft server on a linode vps
Your own minecraft server on a linode vps
 
Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)
 

Similar to ReactJS software installation

Backbase CXP Manager Setup
Backbase CXP Manager SetupBackbase CXP Manager Setup
Backbase CXP Manager Setup
Gagan Vishal Mishra
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
NodeXperts
 
Install Guide
Install GuideInstall Guide
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web App
Edureka!
 
Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.
Naveen Kharwar
 
React js t1 - introduction
React js   t1 - introductionReact js   t1 - introduction
React js t1 - introduction
Jainul Musani
 
1. react - native: setup
1. react - native: setup1. react - native: setup
1. react - native: setup
Govind Prasad Gupta
 
Node.js
Node.jsNode.js
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
Cross-platform Desktop Apps development using HTML, CSS, JS with ElectronCross-platform Desktop Apps development using HTML, CSS, JS with Electron
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
Esinniobiwa Quareeb
 
An Intro into webpack
An Intro into webpackAn Intro into webpack
An Intro into webpack
Squash Apps Pvt Ltd
 
Oracle Developers APAC Meetup #1 - Working with Wercker Worksheets
Oracle Developers APAC Meetup #1 -  Working with Wercker WorksheetsOracle Developers APAC Meetup #1 -  Working with Wercker Worksheets
Oracle Developers APAC Meetup #1 - Working with Wercker Worksheets
Darrel Chia
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
kesavan N B
 
Create ReactJS Component & publish as npm package
Create ReactJS Component & publish as npm packageCreate ReactJS Component & publish as npm package
Create ReactJS Component & publish as npm package
Andrii Lundiak
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
Jacob Nelson
 
Build, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerBuild, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using Docker
Osama Mustafa
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
Concetto Labs
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
Vijay Shukla
 
NodeJs Session03
NodeJs Session03NodeJs Session03
NodeJs Session03
Jainul Musani
 
How to dockerize rails application compose and rails tutorial
How to dockerize rails application compose and rails tutorialHow to dockerize rails application compose and rails tutorial
How to dockerize rails application compose and rails tutorial
Katy Slemon
 
WordPress Bhubaneswar Meetup - dive into gutenberg creation
WordPress Bhubaneswar Meetup - dive into gutenberg creationWordPress Bhubaneswar Meetup - dive into gutenberg creation
WordPress Bhubaneswar Meetup - dive into gutenberg creation
Priyanka Behera
 

Similar to ReactJS software installation (20)

Backbase CXP Manager Setup
Backbase CXP Manager SetupBackbase CXP Manager Setup
Backbase CXP Manager Setup
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
Install Guide
Install GuideInstall Guide
Install Guide
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web App
 
Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.
 
React js t1 - introduction
React js   t1 - introductionReact js   t1 - introduction
React js t1 - introduction
 
1. react - native: setup
1. react - native: setup1. react - native: setup
1. react - native: setup
 
Node.js
Node.jsNode.js
Node.js
 
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
Cross-platform Desktop Apps development using HTML, CSS, JS with ElectronCross-platform Desktop Apps development using HTML, CSS, JS with Electron
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
 
An Intro into webpack
An Intro into webpackAn Intro into webpack
An Intro into webpack
 
Oracle Developers APAC Meetup #1 - Working with Wercker Worksheets
Oracle Developers APAC Meetup #1 -  Working with Wercker WorksheetsOracle Developers APAC Meetup #1 -  Working with Wercker Worksheets
Oracle Developers APAC Meetup #1 - Working with Wercker Worksheets
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
 
Create ReactJS Component & publish as npm package
Create ReactJS Component & publish as npm packageCreate ReactJS Component & publish as npm package
Create ReactJS Component & publish as npm package
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
 
Build, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerBuild, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using Docker
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
 
NodeJs Session03
NodeJs Session03NodeJs Session03
NodeJs Session03
 
How to dockerize rails application compose and rails tutorial
How to dockerize rails application compose and rails tutorialHow to dockerize rails application compose and rails tutorial
How to dockerize rails application compose and rails tutorial
 
WordPress Bhubaneswar Meetup - dive into gutenberg creation
WordPress Bhubaneswar Meetup - dive into gutenberg creationWordPress Bhubaneswar Meetup - dive into gutenberg creation
WordPress Bhubaneswar Meetup - dive into gutenberg creation
 

Recently uploaded

South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 

Recently uploaded (20)

South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 

ReactJS software installation

  • 1. How to install Reactjs in windows Hope Tutors
  • 2. In this article we are going to discuss about the installation setup for React JS in windows environment. We just need NodeJS for installing this. Once we done with the installation of NodeJS we can able to install React JS using NPM. This is possible in 2 ways. They are, • webpack & label. • create-react-apps command. Now, in this article the first method is discussed in detail.
  • 3. Using the Webpack & Label: In general, we say webpack as module bundler. It takes modules which are dependent and compile it to one bundle. Generally, we use this in developing the app with the help of command line. This is also possible by configure this using the webpack.config.files. In general Babel is known as JavaScript compilers & transpiler. We use it for converting source code from one to other. With the help of babel, we can use ES6 new feature in our code, babel generally convert this code as ES5. So that we can run this code on any browser.
  • 4. 1st Step: Creating Root folders:  First of all, we need to create a new folder in our desktop and name it as reactapps. This is used for installing all the needed files. This is possible with the help of the command mkdir. For creating any modules we must need to generate package.json. Once we create the folder, just we also need to create this packaage.json. For this we want to run command npm init in command prompt. D:UsersusernamesDocument>mkdir reactApps>npm init This npm init will ask you about the module information. We can able to skip this by the option -Y.
  • 5. 2nd Step: Installing the React & React dom: Our main aim is to install the ReactJS along with its dom package. This is simply possible with the help of the commands install react & react-dom. We can able to add whatever package we install to the package.json. This is possible by using the option – save. Or we can also achieve this in one command. The command is as follows,
  • 6. 3rd Step: Installing the webpack:  Generally, we use the web pack for generating the bundler. For this we have to install web pack. Also, we have to install the webpack - dev-server as well as webpack-cli. This is possible using the following command lines. They are as follows, Or we can also achieve this in one command line. The command line is as follows,
  • 7. 4th Step: Installing the babel:  We have to also install the following. They are, • Babel. • Babel loaders. • Babel core plugins. • Preset env of babel. • Preset react of babel. • HTML web pack plugins. This is possible using the following command lines. They are as follows, Or we can also achieve this in one command line. The command line is as follows,
  • 8. 5th step: Creating Files:  To complete installation process create the following files. 1. webpack.config.js 2. main.js 3. index.html 4. App.js 5. .babelrc
  • 9. 6th Step Setting loader, server and compiler In this step, please add the below code. In this example, the development server port is 8001. You can choose your own port number. const path = require(‘path’); const HtmlWebpackPlugin = require(‘html-webpack-plugin’); module.exports = { entry: ‘./main.js’, output: { path: path.join(__dirname, ‘/bundle’), filename: ‘index_bundle.js’ }, devServer: { inline: true, port: 8001 }, module: { rules: [ { test: /.jsx?$/, exclude: /node_modules/, loader: ‘babel-loader’, query: { presets: [‘es2015’, ‘react’] } } ] }, plugins:[ new HtmlWebpackPlugin({ template: ‘./index.html’ }) ] } In package.json, delete “test” because no test is done.
  • 10. 7th step: Update index file There are two tasks 1. Update div id as “app”. 2. Add “index_bundle.js”.
  • 11. 8th Step: Add App.js and main.js Add the following files Main.js Please create a new file called .babelrc
  • 12. 9th Step: In this step, please start the npm with command “npm start”. create the bundle “npm run build”