Introduction
Setting Up a Project
You need Node.js installed. Then create a project with Vite, a fast build tool:
npm create vite@latest my-app -- --template react
cd my-app
npm install
npm run devOpen the address it prints (usually http://localhost:5173). Edit src/App.jsx and the page updates instantly.
Project structure
| File | Purpose |
|---|---|
index.html | The single HTML page |
src/main.jsx | Starts React and renders <App /> into the page |
src/App.jsx | Your root component |
package.json | Project info and dependencies |