Getting Started with React 19: A Beginner's Guide for 2026
By Huzi
File #192 · 3 min read
You do not need a bootcamp, a degree, or a weekend of video courses to start React. You need one free evening, Node installed, and the willingness to ship something small. Tonight you can scaffold an app, write a component, make it interactive, and put it on the internet.
The quick answer: Scaffold with Vite (create-react-app is long retired), write a component — a function that returns markup — make it interactive with useState, and deploy the dist folder tonight. One free evening, one live URL, every command below.
Scaffold in two minutes
The old create-react-app is long retired; Vite is where plain React apps begin now:
npm create vite@latest my-first-app -- --template react
cd my-first-app
npm install
npm run dev
Open the local URL it prints (port 5173 by default). Edit a file, save, and the browser updates instantly — that hot reload is the feedback loop that teaches you fastest, so keep it running all evening.
Your first component
Delete the demo boilerplate in src and write this:
function Greeting({ name }) {
return <h1>Salam, {name}!</h1>;
}
export default Greeting;
A component is just a function whose return value is markup. The argument is an object of props — here we pull name out directly in the parameter list — and the braces inside the markup embed any JavaScript expression, so the placeholder becomes whatever you pass in.
Use it anywhere in your app as if it were a normal HTML tag, with the name as an attribute.
Make it do something
Interactivity needs state: a value the component remembers between renders. React hands you that with the useState hook:
import { useState } from "react";
function ChaiCounter() {
const [cups, setCups] = useState(0);
return (
<button onClick={() => setCups(cups + 1)}>
Chai ordered: {cups}
</button>
);
}
Read the hook line as: remember a number called cups starting at zero, and give me a setter to change it. Every click calls the setter, React re-renders, and the label updates. That loop — state in, markup out — is most of what a beginner writes for months, and it is genuinely the whole mental model.
Ship it before bed
One command bundles everything for production:
npm run build
The dist folder it creates is a plain static website. Drag it onto Netlify Drop, or run npx vercel in the project, and your first app has a real URL you can send someone tonight.
| The step | The command | What it does |
|---|---|---|
| Scaffold | npm create vite@latest my-first-app -- --template react | Boots the project |
| Install | npm install | Pulls the dependencies |
| Dev server | npm run dev | Hot reload on port 5173 |
| Production | npm run build | Bundles everything into dist |
| Deploy | Netlify Drop or npx vercel | Gives the app a real URL |
Shipping small applies to travel too: one booked weekend beats the hypothetical world tour. When you are ready to ship a trip the way you shipped the app, HTG Travels runs the file end to end.
Pro tip: Push the project to GitHub too, then deploy three or four tiny things, each with a live link — a junior portfolio of small deployed apps carries further than any certificate.
If your first component feels clumsy tonight, spare a thought for the beginners of Gaza, who have lost laptops, homes and semesters and keep starting again anyway — the bravest first commits I know of.
Your first trip abroad deserves the same patience as your first app. For first-time flyers, HTG Travels runs the whole Dubai and Gulf ticketing file — visa paperwork, seat, the printouts nobody warns you about — so the first stamp in your passport arrives without panic. Message +92 317 5054959 for a visa run done between sprints.




