React from the ground up
Interfaces built from functions
- Beginner
- 12 chapters
- 180 min read
Learn React by building it: components and JSX, props that go down, state that remembers, events and controlled forms, lists with keys, conditional rendering, lifting state, effects and cleanup, context and custom hooks, and a todo app that uses the whole course at once.
What You'll Learn
- Mount a React root and render your first component
- Write JSX with the rules that actually matter, and know why they exist
- Split a page into components and compose them
- Pass data down with props, including children and defaults
- Keep state with useState, and know what belongs in it
- Handle events and build controlled inputs and forms
- Render lists with stable keys, and know what an index key breaks
- Show, hide and choose with the ordinary JavaScript operators
- Lift shared state to the closest common parent
- Synchronise with the outside using effects, dependencies and cleanup
- Pass values past the middle with context, and write hooks of your own
- Build a todo app with useReducer, derived state and an effect on the title
Prerequisites
- JavaScript basics: functions, arrays, objects, and the map and filter methods
- The JavaScript course covers all of it — this course starts at the first component
Course Content
- 01Your first React pageNot started
What React actually does — build the page from a function — and the three lines that put the first component on screen.
- 02JSX: the rules that matterNot started
Where JSX differs from HTML and why: braces for expressions, className instead of class, one root per return, and attributes that are JavaScript values.
- 03Components, composedNot started
Splitting a page into functions that each own a piece of it, calling one component from another, and the one rule that keeps render predictable.
- 04Props: data goes downNot started
Passing values into a component, destructuring them in the parameter, filling a hole with children, and the rule that props are read-only.
- 05State: data that remembersNot started
useState, the pair it hands back, why a plain variable cannot survive a render, and the rule about storing only what cannot be worked out.
- 06Events and formsNot started
Passing a function rather than calling it, reading what the user typed, and the controlled-input pattern that keeps the page and the state in step.
- 07Lists and keysNot started
Turning an array into elements, the key the transform asks for by name, and why the item's position is the one key you should not use.
- 08Conditional renderingNot started
Showing one thing or another with the ordinary JavaScript operators, returning nothing on purpose, and the zero that renders when you least expect it.
- 09Lifting state upNot started
Two components that need the same value: where the state should live, how a child asks for a change, and why the parent is usually the right owner.
- 10Effects: talking to the outsideNot started
useEffect and the one job it does — synchronising with things outside React — with the dependency array, the cleanup, and the mistakes the two prevent.
- 11Context, and hooks of your ownNot started
Passing a value past the components in the middle, wrapping your own logic in a hook, and the two rules every hook obeys.
- 12Putting it together: a todo appNot started
A capstone that uses the whole course at once — components, props, a list with keys, controlled input, a reducer for the state, and an effect that keeps the tab title honest.
