Getting Started with Vite and React
Why Vite + React
Vite scaffolds a modern React project with a fast refresh loop. You edit a component, save, and the browser updates without a full manual reload.
Create a project
Need Node.js and npm first. From an empty folder parent directory:
npm create vite@latest my-react-app -- --template react
cd my-react-app
npm install
npm run dev
Open the app
Vite prints a local URL (often http://localhost:5173). Open it in a browser. You should see the default Vite + React starter page.
Know the key files
index.html— the single HTML shellsrc/main.jsx— mounts React into the pagesrc/App.jsx— your first componentpackage.json— scripts and dependencies
Comments
One comment per signed-in account. Comments are saved with this page’s URL.