Unlike plain HTML/CSS/JS, React isn't something you can just link with a <script> tag for real, ongoing development — it works best with a build tool that handles JSX and modern JavaScript. Vite is the current standard choice for starting a new React project.
You'll need Node.js installed — it provides npm, the package manager used to install React and the build tooling.
node --version
npm --versionnpm create vite@latest my-react-app -- --template react
cd my-react-app
npm install
npm run devnpm run dev starts a local development server, usually at http://localhost:5173, and reloads the page automatically whenever you save a file.
| File/folder | What it's for |
|---|---|
| src/main.jsx | The entry point — renders the root App component into the actual HTML page |
| src/App.jsx | The root component — you'll spend most of your time here and in files you create alongside it |
| index.html | The one real HTML file — contains a single empty , which React fills in |
| package.json | Lists installed packages and scripts (like npm run dev) |
Not Create React App
Create React App, an older tool you'll still see referenced in a lot of existing tutorials and Stack Overflow answers, is no longer the recommended way to start a new project — it's been officially deprecated. Vite is faster and is what this section, and most current React learning material, uses.
With a project actually running, the next lesson looks at JSX — the syntax you'll see inside every component from here on.