Skip to content
TeachTrails
DevelopmentReact

What Is React? Explained Simply for Beginners

What React is and why almost every web app uses it: components, props and state explained in plain English, using one simple To-Do app as the example.

Sukanya Saha, Technology Consultant

7 min read

Beginner friendly

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:

πŸ—‚οΈ The To-Do app, broken into components
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
    └── TaskItem

The three ideas behind all of React

IdeaIn plain EnglishIn our To-Do app
ComponentsReusable pieces of the screen, written as functionsTaskItem shows one task; we use it once per task
PropsData a parent gives to a child, like function argumentsApp gives each TaskItem its task
StateData a component remembers, which can changeThe 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:

Greeting.tsx
// 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 JavaScriptReact
What you writeFind the checkbox, find the title, add a CSS class, update the 'tasks left' counter, save…Change one value in state
What updates the pageYou, step by step (easy to forget one)React, automatically
As the app growsGets messy fastStays organised in components

How a React app runs

  1. 1

    index.html

    An almost empty page with one <div id="root">.

  2. 2

    main.tsx

    Tells React: draw the App component inside #root.

  3. 3

    App and its components

    Return JSX describing the screen for the current state.

  4. 4

    User does something

    Clicks, types… An event handler updates state.

  5. 5

    React re-renders

    It runs the components again and updates only what changed on the page.

The tools we'll use

ToolIts jobWhy this one
React 19Builds the screensThe most used UI library
TypeScriptJavaScript with typesCatches mistakes as you type, and makes props clear
ViteRuns the app while you code and builds it for the webVery fast, and the standard way to start a React app
BunInstalls packages and runs scriptsOne 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. 1. In React, what is a component?

  2. 2. How does a parent give data to a child component?

  3. 3. A task is ticked off. What do you change in React?

  4. 4. Which tool creates and runs our React project?

React for Beginners

Part 1 of 9: What Is React