React: Build User Interfaces
Components, JSX, props, lists, events, state, forms, effects, refs, custom Hooks, reducers and context, with every example and exercise running live in your browser.
- Level
- Intermediate
- Time
- About 22 hours
- Modules
- 5
- Lessons
- 15
- Exercises
- 45
React is the most widely used library for building web interfaces. This course teaches it from the first component to reducers and context, the way React's own documentation recommends: describe what the page should look like for the current data, and let React keep the page in step.
Every example is a live preview you can edit and run, and every exercise is a small app that is checked the way a user would use it: the checks click its buttons, type into its fields and read what it shows. The code runs in your browser with React 19, the current version.
What you will learn
- Build interfaces from small components that receive data as props
- Render lists and conditional content from data
- Handle events and keep interactive state with useState
- Build controlled forms with validation
- Synchronise with the outside world using effects and refs
- Organise larger apps with custom Hooks, reducers and context
Skills you will gain
- Component design and composition
- State management with Hooks
- Forms and validation
- Effects, timers and cleanup
- Structuring React apps
Before you start
- JavaScript: functions, arrays and their methods, objects, destructuring and arrow functions (the JavaScript course)
- HTML and CSS basics: elements, attributes, forms and classes (the HTML and CSS courses)
- Nothing to install: React and the JSX compiler run in your browser
Where it is used
- Single-page web applications
- Interactive dashboards and admin panels
- Forms, wizards and checkouts
- A base for Next.js and React Native
Modules
Module 1: React foundations
What React is, components and rendering, the rules of JSX, and passing data with props and children.
- 1
What React is: components and rendering Intermediate
What React does, how a page is built from components that are plain functions, how the App component is rendered into the page, and how React keeps the page in step with your data.
- 2
JSX: HTML inside JavaScript Intermediate
The rules of JSX: one root element or a fragment, JavaScript expressions in braces, className and other camelCase attributes, style objects, closing every tag, and how JSX becomes function calls.
- 3
Props: passing data to components Intermediate
How components receive data through props, destructuring props with default values, the special children prop, and why props are read-only.
Module 2: Rendering data and responding
Lists with keys, conditional rendering, and event handlers for clicks, keys and forms.
- 1
Lists and keys Intermediate
Rendering arrays with map, filtering and sorting before rendering, why every item needs a key, and how to choose a good one.
- 2
Conditional rendering Intermediate
Showing different things in different situations: returning early, the conditional operator, the && operator and its 0 trap, returning null, and choosing between components.
- 3
Responding to events Intermediate
Handling clicks, key presses and form submissions: passing functions to onClick and friends, the event object, passing arguments with arrow functions, preventDefault, and passing handlers down as props.
Module 3: State and forms
useState and updater functions, controlled inputs and validation, and lifting state up to share it.
- 1
State: a component's memory Intermediate
useState for values that change over time, why setting state makes React render again, state as a snapshot, updater functions, and keeping objects and arrays in state without changing them.
- 2
Forms and controlled inputs Intermediate
Controlled inputs that show state and update it on every keystroke, text fields, checkboxes and selects, handling submit, validating, and computing values from form state instead of storing them.
- 3
Sharing state between components Intermediate
Lifting state up to the closest common parent, passing values and setter callbacks down as props, keeping one source of truth, and choosing where each piece of state should live.
Module 4: Effects, refs and custom Hooks
useEffect with dependencies and cleanup, refs for DOM access and silent values, and custom Hooks for reusable logic.
- 1
Effects: syncing with the outside world Intermediate
useEffect for work that must happen after rendering: timers, the document title, subscriptions; dependency arrays, cleanup functions, and when you do not need an effect at all.
- 2
Refs: remembering without rendering Intermediate
useRef for values that must survive renders without causing them, refs to DOM elements for focus and measurement, storing timer ids, and when to use a ref instead of state.
- 3
Custom Hooks: reusing stateful logic Advanced
Extracting state and effects into functions whose names start with use, what they may return, how each call gets its own state, and the rules of Hooks.
Module 5: Building bigger apps
Reducers for complex updates, context for app-wide values, and the process of designing a React interface.
- 1
Reducers: organising state changes Advanced
useReducer for state with many kinds of updates: actions that describe what happened, a pure reducer function that computes the next state, dispatching from event handlers, and when to prefer a reducer to useState.
- 2
Context: sharing values across the tree Advanced
Passing data deep into the tree without prop drilling: createContext, providing a value, useContext, combining context with state and reducers, and when context is and is not the right tool.
- 3
Thinking in React Advanced
How to build a React interface from a design: break it into a component hierarchy, build a static version from props, find the minimal state, decide where it lives, and add inverse data flow.
Projects
- A budget tracker Build a React app that records income and expenses, shows the balance and the spending per category, and lets the user filter, edit and delete entries.
- A timed quiz app Build a quiz in React that shows one question at a time with a countdown, records answers, and ends with a score and a review of each question.
What to learn next
- TypeScript: JavaScript with Types Types, interfaces, unions and narrowing, classes, generics, mapped and conditional types, and typed async code, checked by the real TypeScript compiler.
- JavaScript: Programming for the Web From your first program to closures, async code and modules, with every variable and call visible, then real pages that respond, load data and remember it.