Setting Up React Environment

📘 React.js 👁 50 views 📅 Nov 05, 2025
⏱ Estimated reading time: 1 min

To start developing with React, you need a basic JavaScript development setup. The most common and modern approach uses Node.js and Vite.


Prerequisites

1. Install Node.js

  • Download and install Node.js (LTS version)

  • Node.js includes npm (Node Package Manager)

Verify installation:

node -v npm -v

Creating a React Application (Using Vite)

Step 1: Create the Project

npm create vite@latest my-react-app

Step 2: Choose Options

  • Framework: React

  • Variant: JavaScript or TypeScript


Step 3: Move into Project Folder

cd my-react-app

Step 4: Install Dependencies

npm install

Step 5: Start Development Server

npm run dev

Open the provided local URL in your browser to see the React app running.


Project Structure (Basic)

my-react-app/ │── node_modules/ │── public/ │── src/ │ ├── App.jsx │ ├── main.jsx │ └── index.css │── package.json
  • App.jsx → Main component

  • main.jsx → Entry point

  • index.css → Global styles


Alternative: Create React App (CRA)

npx create-react-app my-app cd my-app npm start

Note: CRA is older and slower than Vite, but still widely known.


Development Tools (Optional)

  • VS Code – Code editor

  • ES7+ React Snippets – VS Code extension

  • React Developer Tools – Browser extension


Next Steps

After setup, you can start learning:

  • Components and JSX

  • Props and State

  • Event handling

  • Hooks



🔒 Some advanced sections are available for Registered Members
Register Now

Share this Post


← Back to Tutorials

Popular Competitive Exam Quizzes