6. What is Vite

⚑ Setting Up a React Project with Vite

What is Vite?

🧱 Why Use Vite?

βœ… Automatically sets up all required configurations.
βœ… Generates only the files you actually need.
βœ… Much faster than older tools like Create React App.

πŸ–₯️ Creating a New React Project

Step 1: Open your command line (Command Prompt, PowerShell, or Terminal).

Step 2: Run this command:

npm create vite@latest my-react-app -- --template react

Creates a new React project called my-react-app using Vite’s React template.

βš™οΈ Installing Dependencies

After the project is created, run:

cd my-react-app
npm install

πŸ“¦ Dependencies = external libraries your app needs (like React, ReactDOM, etc.).

πŸ“ Important Files & Folders

πŸš€ Running the Project

Start your local server:

npm run dev

🧩 Editing Your App


In short:
Vite makes starting a React project super fast and simple.
It handles setup, dependencies, and dev server automatically β€” so you can focus on building your app, not configuring tools.