ReactJS
Operating ReactJS with Windows
Contents
First Install: Node & React
Preparation: Install Node.js and NPM on Windows
By How to Install Node.js and NPM
- Download “node-v16.13.0-x64.msi” file - see How to Install Node.js and NPM on Windows Step 1

- Install “node-v16.13.0-x64.msi” How to Install Node.js and NPM on Windows Step 2
- Verify the installation
- enter windows command prompt (cmd)
- type here to search
- enter: "cmd"
- enter Command Prompt
- Command Prompt is here!!!
- Verify NPM and Node version - see How to Install Node.js and NPM on Windows Step 3
- Basic Node.js Usage - see Basic Node.js Usage
- Basic Node.js Usage - see Basic Node.js Usage
- text editor
- Open text editor (notepad++ Etc.)
- copy the following to
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end('Hello World!'); }).listen(8080); - save the file
- save as "myprogram.js"
- at "C:\Users\username"
- cmd
- Access to the Windows command line (Search--> cmd--> left key)
- enter
-
cd c:\users\username node myprogram.js -
- Bowser
- Enter a browser (Chrome Etc.)
- Enter the following link localhost:8080/ and you "see Hii World!"
- text editor
- enter windows command prompt (cmd)
React Getting Started
By w3schools: React Getting Started
- Setting up a React Environment
-
- Access to the Windows command line (Search--> cmd--> left key)
- enter
-
cd c:\users\username npx create-react-app my-react-app - open "File Explorer" at "c:\users\username" and verify a new directory "my-react-app" with sub-directories

- enter ..my-react-app/src and open App.js to see the main file, that is JS file and not HTML!!!
-
-
Run-the-React-Application
- Access to the Windows command line (Search--> cmd--> left key)
- enter
cd my-react-app npm start - wait until the process complete
- Enter a browser (Chrome Etc.)
- Enter the following link http://localhost:3000/ (not localhost:8080/ ) and you "see the following:
- App.js code, brought the file here because the file in its place is about to change...
import logo from './logo.svg'; import './App.css'; function App() { return ( <div className="App"> <header className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <p> Edit <code>src/App.js</code> and save to reload. </p> <a className="App-link" href="https://reactjs.org" target="_blank" rel="noopener noreferrer" > Learn React </a> </header> </div> ); } export default App;
-
Modify the React Application
- open c:\users\username/my-react-app/src/App.js file at any browser
- change it to
-
function App() { return ( <div className="App"> <h1>Hellow, name is Arie</h1> </div> ); } export default App; - Save
- Enter http://localhost:3000/ and see:

- Pay attention that immediately after saving the App.js file --> browser is updated with the need ti do the refresh!!!
Quick Start
Run-the-React-Application
Note: If Node and React are already installed on this computer - you are in the right place
- Access to the Windows command line (Search--> cmd--> left key)
- enter
cd my-react-app npm start - wait until the process complete
- Enter a browser (Chrome Etc.)
- Enter the following link http://localhost:3000/ (not localhost:8080/ ) and you "see the following: