Learn React
Build interactive user interfaces with React. Write JSX, split pages into components, pass data with props, manage state and side effects with hooks, organise components with proven patterns, and style and handle forms.
- Intermediate level
- 7 modules
- 41 lessons
- 146 tasks and questions
Syllabus
01JSXMeet React and JSX, the HTML-like syntax React uses to describe interfaces. Nest elements, close every tag, set attributes, embed JavaScript, show content conditionally and render lists with keys.8 lessons
02ComponentsPackage UI into components - functions that return JSX - with their own logic and event handlers, combine them into bigger components, and learn to split a design into a component tree.5 lessons
03PropsMake components reusable by passing them data. Read props, pass values of every type, send event handlers down from parents, and wrap content with children and default values.5 lessons
04State and Effect HooksGive components memory with useState, update state safely from events, change objects and arrays without mutating them, and run side effects with useEffect: dependency arrays, cleanup and data fetching. Finish with a small reminder board.11 lessons
- 01State with useState
- 02Starting Values for State
- 03Toggling with State
- 04Updating State from the Previous State
- 05Objects and Arrays in State
- 06Side Effects with useEffect
- 07Cleaning Up Effects
- 08Dependency Arrays and One Effect per Job
- 09Fetching Data in an Effect
- 10Project: Reminder Board
- 11State and Effects Quiz
05Programming PatternsOrganise state across components - lift state up to a shared parent, split components into stateful containers and stateless presentational pieces, and derive values instead of duplicating state.4 lessons
06Styling React AppsStyle components with inline style objects, class names and stylesheets, switch styles based on state, and get to know the ways larger React projects organise CSS.4 lessons
07Forms in ReactConnect inputs to state as controlled components, handle form submission, work with selects and checkboxes, and know when an uncontrolled input with a ref is the simpler choice.4 lessons