React Getting Started Guide

Subject: Web Development

šŸ”¹ 1. React Directly in HTML (For Learning / Demos)

This is the quickest way to start using React for learning purposes — no installation required.

šŸ“¦ What You Need:

Just a browser and a text editor like VS Code.

🪜 Steps:

āœ… Step 1: Create an HTML File

Create a file called index.html:

āœ… Step 2: Open in Browser

Just double-click the file or open with Live Server in VS Code.


šŸ”¹ 2. React for Production (Using Node.js + npm)

This is the recommended way for serious projects.

šŸ“¦ What You Need:

  • Node.js (comes with npm)
  • A terminal
  • A code editor (like VS Code)

šŸ”„ Install Node.js

Go to: https://nodejs.org and install the LTS version.

Then check installation in your terminal:


āš™ļø Option A: Using Vite (Fastest Modern Setup)

🪜 Steps:

āœ… Step 1: Create a Vite Project

āœ… Step 2: Install dependencies

āœ… Step 3: Start the development server

🟢 Open the browser and go to http://localhost:5173


āš™ļø Option B: Using Create React App (CRA)

🪜 Steps:

āœ… Step 1: Create the app

āœ… Step 2: Start the development server

🟢 It will open automatically in the browser at http://localhost:3000


🧱 Project Structure (CRA or Vite)


šŸŽÆ Summary: Which One Should You Use?

MethodBest ForSetup TimeTools Needed
React in HTML (CDN)Learning, small demosā±ļø InstantNone
ViteModern apps, fast setup⚔ FastNode + npm
Create React AppTraditional full setupā±ļø MediumNode + npm