Search for the Article

My First project on React

Step 1: Install Node.js

React requires Node.js and npm (Node Package Manager). If you haven’t installed Node.js:

Download Node.js:
  1. Visit Node.js Official Website.
  2. Download and install the LTS (Long Term Support) version.

Verify Installation:

  1. Open a terminal or Command Prompt.
  2. Run

node -v
npm -v

You should see the versions of Node.js and npm.


Step 2: Create a New React Project

Using Create React App (CRA):

  1. Open a terminal or Command Prompt.
  2. Navigate to the folder where you want to create the React project:

Run
npx create-react-app my-first-react-app

This will create a new React project named my-first-react-app.


Navigate to the Project Folder:

cd my-first-react-app

Step 3: Open Project in Visual Studio

Open Visual Studio:
Launch Visual Studio from the Start menu.
File → Open → Folder.