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

PPTX
Activemq installation and master slave setup using shared broker data
PDF
Angular Part 3 (Basic knowledge)
PPTX
Introduction to using Grunt & Bower with WordPress theme development
PDF
Modernizing Your WordPress Workflow with Grunt & Bower
PPTX
Deploy a compute instance with a remote startup script
PDF
Frontend Build Tools - CC FE & UX
PPTX
Google cloud essential skills challenge lab
PPTX
Grunt and Bower
Activemq installation and master slave setup using shared broker data
Angular Part 3 (Basic knowledge)
Introduction to using Grunt & Bower with WordPress theme development
Modernizing Your WordPress Workflow with Grunt & Bower
Deploy a compute instance with a remote startup script
Frontend Build Tools - CC FE & UX
Google cloud essential skills challenge lab
Grunt and Bower

What's hot (20)

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

Similar to How to install ReactJS software (20)

PPTX
Backbase CXP Manager Setup
PPTX
Improving build solutions dependency management with webpack
DOCX
PPTX
Node JS Express : Steps to Create Restful Web App
PPTX
Improving WordPress Theme Development Workflow - Naveen Kharwar.
PDF
React js t1 - introduction
PPTX
1. react - native: setup
PPTX
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
PPTX
An Intro into webpack
PDF
Oracle Developers APAC Meetup #1 - Working with Wercker Worksheets
PPT
Setting up the hyperledger composer in ubuntu
PDF
Create ReactJS Component & publish as npm package
PDF
UNIT-3.pdf, buffer module, treams,file accessing using node js
PPTX
Overview of Node JS
PDF
Build, Deploy and Run Node Js Application on Azure using Docker
PPTX
How create react app help in creating a new react applications
PDF
Introduction of webpack 4
PPTX
NodeJs Session03
PPTX
Laravel Crud Tutorial Basic Step by Stepy S
Backbase CXP Manager Setup
Improving build solutions dependency management with webpack
Node JS Express : Steps to Create Restful Web App
Improving WordPress Theme Development Workflow - Naveen Kharwar.
React js t1 - introduction
1. react - native: setup
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
An Intro into webpack
Oracle Developers APAC Meetup #1 - Working with Wercker Worksheets
Setting up the hyperledger composer in ubuntu
Create ReactJS Component & publish as npm package
UNIT-3.pdf, buffer module, treams,file accessing using node js
Overview of Node JS
Build, Deploy and Run Node Js Application on Azure using Docker
How create react app help in creating a new react applications
Introduction of webpack 4
NodeJs Session03
Laravel Crud Tutorial Basic Step by Stepy S
Ad

Recently uploaded (20)

PDF
RIBOSOMES.12.pdf kerala msc botany degree
PDF
Manager Resume for R, CL & Applying Online.pdf
PDF
Chapter 7-2.pdf. .
PPTX
engineeringAlumni Meet 2025 -Principal.pptx
PPTX
Public_Health_Informghiufdrgatics_PPT.pptx
PPTX
LIFE ORIENTATION SLIDES 2025 Grade 11.pptx
PDF
HR Jobs in Jaipur: 2025 Trends, Banking Careers & Smart Hiring Tools
PPTX
Untitled presentation voice baed jounral
PPTX
OCCULAR MANIFESTATIONS IN LEPROSY.pptx bbb
PPTX
chapter 3_bem.pptxKLJLKJLKJLKJKJKLJKJKJKHJH
PPTX
Discovering the LMA Course by Tim Han.pptx
DOCX
How to Become a Criminal Profiler or Behavioural Analyst.docx
PPT
Leadership essentials to build your carrier
PDF
313302 DBMS UNIT 1 PPT for diploma Computer Eng Unit 2
PPTX
internship presentation of bsnl in colllege
PPTX
PMP (Project Management Professional) course prepares individuals
PPTX
Cyber_Awareness_Presrerereerentation.pptx
PDF
Daisia Frank: Strategy-Driven Real Estate with Heart.pdf
PDF
Josh Gao Strength to Strength Book Summary
PPTX
Sports and Dance -lesson 3 powerpoint presentation
RIBOSOMES.12.pdf kerala msc botany degree
Manager Resume for R, CL & Applying Online.pdf
Chapter 7-2.pdf. .
engineeringAlumni Meet 2025 -Principal.pptx
Public_Health_Informghiufdrgatics_PPT.pptx
LIFE ORIENTATION SLIDES 2025 Grade 11.pptx
HR Jobs in Jaipur: 2025 Trends, Banking Careers & Smart Hiring Tools
Untitled presentation voice baed jounral
OCCULAR MANIFESTATIONS IN LEPROSY.pptx bbb
chapter 3_bem.pptxKLJLKJLKJLKJKJKLJKJKJKHJH
Discovering the LMA Course by Tim Han.pptx
How to Become a Criminal Profiler or Behavioural Analyst.docx
Leadership essentials to build your carrier
313302 DBMS UNIT 1 PPT for diploma Computer Eng Unit 2
internship presentation of bsnl in colllege
PMP (Project Management Professional) course prepares individuals
Cyber_Awareness_Presrerereerentation.pptx
Daisia Frank: Strategy-Driven Real Estate with Heart.pdf
Josh Gao Strength to Strength Book Summary
Sports and Dance -lesson 3 powerpoint presentation

How to install ReactJS software

  • 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”