Our example for the whole course: a To-Do app
Just like the Node.js course, we build one simple app from start to finish: a To-Do list. You type a task, press Add, tick it off, filter it and delete it. In lesson 7 we connect it to a real backend with login. Every new idea is one new piece of this app.
The LEGO picture
Think of a web page as a LEGO model. Instead of carving the whole thing from one block, you snap together small bricks. Each brick is a component. You build a brick once and reuse it everywhere. Our To-Do app is made of these bricks:
App β the whole app; it owns the list of tasks
βββ TaskForm β the text box and the "Add" button
βββ FilterBar β the All / Active / Done buttons
βββ TaskList β the list
βββ TaskItem β one task: checkbox, title, delete button
βββ TaskItem
βββ TaskItemThe three ideas behind all of React
| Idea | In plain English | In our To-Do app |
|---|---|---|
| Components | Reusable pieces of the screen, written as functions | TaskItem shows one task; we use it once per task |
| Props | Data a parent gives to a child, like function arguments | App gives each TaskItem its task |
| State | Data a component remembers, which can change | The list of tasks, the text in the box, the current filter |
Here's what a component looks like. It's a normal function that returns something that looks like HTML:
// A component is just a function that returns what to show.
function Greeting({ name }: { name: string }) {
return <h1>Hello, {name}!</h1>;
}
// Use it like an HTML tag, as many times as you like:
<Greeting name="Asha" />
<Greeting name="Ravi" />That HTML-looking code inside JavaScript is called JSX. The {name} part drops a JavaScript value into the page. You'll write a lot of it, and lesson 2 covers its few rules.
Why not just use plain JavaScript?
With plain JavaScript, every change means finding the right element and editing it by hand:
| When a user ticks a task⦠| Plain JavaScript | React |
|---|---|---|
| What you write | Find the checkbox, find the title, add a CSS class, update the 'tasks left' counter, save⦠| Change one value in state |
| What updates the page | You, step by step (easy to forget one) | React, automatically |
| As the app grows | Gets messy fast | Stays organised in components |
How a React app runs
- 1
index.html
An almost empty page with one <div id="root">.
- 2
main.tsx
Tells React: draw the App component inside #root.
- 3
App and its components
Return JSX describing the screen for the current state.
- 4
User does something
Clicks, types⦠An event handler updates state.
- 5
React re-renders
It runs the components again and updates only what changed on the page.
The tools we'll use
| Tool | Its job | Why this one |
|---|---|---|
| React 19 | Builds the screens | The most used UI library |
| TypeScript | JavaScript with types | Catches mistakes as you type, and makes props clear |
| Vite | Runs the app while you code and builds it for the web | Very fast, and the standard way to start a React app |
| Bun | Installs packages and runs scripts | One fast tool (npm works too; we show both) |
Key takeaways
- React is a library for building user interfaces from reusable components.
- Components receive props and can keep state.
- You change state; React updates the page.
- We'll build one To-Do app across the whole course, and connect it to a backend in lesson 7.
- Tools: React 19, TypeScript, Vite and Bun.
Frequently asked questions
What is React in simple words?
React is a JavaScript library for building the screens of web apps out of small, reusable pieces called components. You describe what the screen should look like for the current data, and React updates the page for you when the data changes.
Is React a framework or a library?
React itself is a library: it only handles the user interface. Tools like Vite (which we use) or Next.js add the rest, such as a dev server, building for production and, in Next.js, routing.
What do I need to know before learning React?
Basic HTML, a little CSS, and JavaScript basics: variables, functions, arrays (map and filter), objects and arrow functions. You don't need any backend knowledge.
Is React still worth learning in 2026?
Yes. React is the most used library for building web interfaces, it's used by companies of every size, and it's asked for in a very large share of frontend job posts.
React or plain JavaScript?
For a tiny page, plain JavaScript is fine. As soon as the page has data that changes (a list, a form, a logged-in user), React keeps the code much simpler because you never update the page by hand.
π§ Quick check: what is React?
1. In React, what is a component?
2. How does a parent give data to a child component?
3. A task is ticked off. What do you change in React?
4. Which tool creates and runs our React project?