You need Node.js LTS installed (node -v should print a version). npm comes with it.
Create the project
In a terminal, in a folder you own:
npm create vite@latest my-react-app -- --template react cd my-react-app npm install npm run dev
Vite prints a local URL (usually http://localhost:5173). That command is the official Vite React template. Do not use npx create-react-app — CRA is unmaintained.
What the files are
package.json— project name, scripts (dev,build), and dependencies. React itself is an npm package:reactandreact-dom.node_modules/— downloaded packages. Do not commit this folder;package-lock.jsonis enough for others to runnpm install.index.html— the only HTML file. It has a<div id="root">. React mounts your app there.src/main.jsx—createRoot(document.getElementById('root')).render(<App />).src/App.jsx— your first component. Edit this and the page hot-reloads.
Build for production
npm run build writes static files to dist/. You can host that folder on GitHub Pages, Netlify or Vercel — see host a site free.
If
npm create vite fails, your Node version is too old, or you are offline. The template name react is JavaScript; react-ts adds TypeScript. This course uses JavaScript.