Course 04 · Framework

React
Describe it once. Let it re-render.

Components, state and effects — the model behind most interfaces built today.

20Lessons
≈ 4hReading
20Playable now
JSXPropsStateEffectsHooksPatterns

0 of 20 lessons finished — nothing yet

The syllabus

20 lessons,
in the order they build on each other.

Start lesson one ↗
01

Why React exists

The problem it solves, what it is not, and the one idea the rest depends on.

≈ 9 min
02

Starting a project

Vite, the file layout, how a component reaches the page, and the dev server.

≈ 9 min
03

JSX

Markup in JavaScript: expressions, attributes, fragments and the rules that differ from HTML.

≈ 11 min
04

Components and props

Writing a component, passing data down, children, and composition over configuration.

≈ 12 min
05

Conditional rendering

Showing things sometimes, without leaving a stray 0 on the page.

≈ 10 min
06

Lists and keys

Rendering arrays, choosing a key that is stable, filtering and empty states.

≈ 11 min
07

State

useState, updating from the previous value, and what belongs in state at all.

≈ 13 min
08

Events

Handlers, arguments, the synthetic event, and not calling the function too early.

≈ 10 min
09

Forms

Controlled inputs, a form object, validation and submitting.

≈ 12 min
10

Lifting state up

One owner for each piece of state, and children that only report events.

≈ 11 min
11

Effects

useEffect, dependencies, cleanup, and the many cases where you do not need one.

≈ 14 min
12

Fetching data

Loading and error states, cancelling, and why this gets moved to a library.

≈ 12 min
13

Refs

Reaching a DOM node, keeping a value between renders, and forwarding a ref.

≈ 10 min
14

Re-renders and memo

What actually causes a re-render, useMemo, useCallback, and measuring first.

≈ 12 min
15

useReducer

State with rules, actions, and when it beats several useState calls.

≈ 11 min
16

Context

Sharing state without threading props, and the re-render cost of doing it badly.

≈ 12 min
17

Custom hooks

Extracting stateful logic, the rules of hooks, and naming them so they read well.

≈ 12 min
18

Structuring an app

Folders, component size, shared UI, and where the logic should live.

≈ 11 min
19

Routing

Client-side routes, links, parameters and a not-found page.

≈ 11 min
20

Testing a component

Testing what the user sees, queries by role, and what is not worth testing.

≈ 11 min