React

Intermediate · Roadmap · 54 lessons · 10 groups

The component model and the hooks that drive it — state, effects, refs, memoization, and the custom-hook and composition patterns built on top — then the ecosystem a real app needs: routing, server-state libraries, global-state stores, Suspense and concurrent rendering, server components, styling, testing, and typing it all with TypeScript. The JavaScript language itself is taught in javascript, the type system in typescript, and framework-specific deep dives (Next.js, Remix) get their own roadmaps later in this wave. Fifty-four lessons.

0%

Not started

Nothing saved yet. Progress is kept in this browser until you sign in.

Start the path

React fundamentals · 7

State, events, and forms · 6

Effects and refs · 6

Performance and memoization · 5

Component architecture and patterns · 6

Routing · 4

Data fetching and state management · 6

Concurrent React and Suspense · 5

Server-side React · 3

React in practice · 6

01Why React, and the component modelThe manual-DOM pain React was built to remove, what "declarative" actually means, and why a component — not a page — is the unit you build with.Beginner · 13 min02Setting up a React projectCreating a React app with Vite, what Create React App's deprecation means for you, and the files a fresh project actually gives you.Beginner · 16 min03JSX syntax and compilationHow JSX's braces and rules actually work, what it compiles down to, and the places it quietly differs from HTML.Beginner · 9 min04The virtual DOM and reconciliationWhat the virtual DOM actually is, how React diffs trees to update the real DOM efficiently, and where Fiber fits in.Intermediate · 14 min05Components and propsWriting function components, passing and reading props, why props are read-only, and what the children prop is for.Beginner · 10 min06Conditional renderingRendering different JSX based on a condition with &&, ternaries, and early returns — and the classic 0 && pitfall that renders a literal zero.Beginner · 12 min07Rendering lists and keysUsing .map() to render a list of elements, why React needs a stable key for each item, and the bug the index-as-key shortcut causes.Beginner · 6 min01Handling events in ReactHow JSX wires DOM events to handler functions, what a synthetic event actually is, passing arguments to a handler, and when to call preventDefault.Beginner · 7 min02useState and component stateThe useState hook, why updates are batched, the functional-update form for updates based on previous state, and why state is isolated per component instance.Beginner · 11 min03Lifting state up and compositionSharing state between sibling components by moving it to their closest common parent, and why composition is often a better fix than deeper prop drilling.Intermediate · 12 min04Forms and controlled inputsControlled vs. uncontrolled inputs, wiring value and onChange, handling several form fields with one shared handler, and where React 19 form actions fit.Beginner · 9 min05The rules of hooksWhy hooks must only be called at a component's top level and only from components or hooks, how React tracks hook state by call order, and ESLint enforcement.Beginner · 9 min06useReducer for complex stateWhen state logic outgrows useState, the reducer pattern of state, action, and dispatch, the useState vs useReducer tradeoff, and a worked todo-list example.Intermediate · 8 min01The component lifecycle, thought about through hooksWhy mount/update/unmount thinking from class components is the wrong mental model for hooks, and how to think in terms of synchronization instead.Intermediate · 24 min02useEffect and synchronizing with external systemsHow useEffect's dependency array is actually compared, the bugs missing or extra dependencies cause, and when you don't need an effect at all.Intermediate · 14 min03Data fetching in effectsFetching data inside useEffect with loading and error state, and the honest limits of the pattern before you reach for a data-fetching library.Intermediate · 7 min04Cleanup and race conditions in effectsCleanup functions, AbortController, avoiding setState after unmount, and fixing the classic stale-request race condition with a worked example.Intermediate · 16 min05useRef and mutable valuesUsing useRef for a mutable value that persists across renders without triggering a re-render — timer ids, previous-value tracking, render counters.Intermediate · 10 min06Direct DOM access with refsAttaching a ref to a DOM element, React 19's ref-as-prop versus forwardRef, useImperativeHandle, focus management, and when reaching into the DOM is right.Intermediate · 13 min01Why React re-rendersWhat actually triggers a React re-render, why it cascades to children by default, and why a re-render is not the same thing as the browser repainting pixels.Intermediate · 7 min02useMemo and useCallbackMemoizing an expensive calculation with useMemo and a stable function reference with useCallback, and the dependency-array discipline both demand.Intermediate · 25 min03React.memo and component memoizationHow React.memo skips a re-render when props haven't shallowly changed, and the new-object-every-render gotcha that quietly defeats it.Intermediate · 10 min04The React Compiler and automatic memoizationHow the stable React Compiler auto-inserts memoization and what it changes about writing useMemo, useCallback, and memo by hand.Intermediate · 10 min05Profiling with React DevToolsUsing the React DevTools Profiler's flamegraph and ranked chart to record a session, find a wasted re-render, and trace it back to its trigger.Intermediate · 13 min01Context, and avoiding prop drillingcreateContext and useContext, when reaching for context actually pays off, and why every consumer re-renders when the value changes.Intermediate · 13 min02Compound componentsBuilding components that implicitly share state through context, with a worked Tabs/Tab example, and why it beats a prop-heavy API.Intermediate · 18 min03Render props and higher-order componentsThe pre-hooks patterns for sharing stateful logic, worked examples of each, and why hooks replaced most of their everyday uses.Intermediate · 7 min04Custom hooksExtracting reusable stateful logic into your own hook, the use-prefix convention, and composing built-in hooks inside one, with a worked example.Intermediate · 10 min05Controlled vs. uncontrolled componentsWho owns a component's state — itself or its parent — generalized beyond form inputs, and how to design an API that supports both.Intermediate · 9 min06PortalscreatePortal, rendering a subtree outside its parent's DOM hierarchy for modals and tooltips, and why events still bubble through the React tree.Intermediate · 12 min01Client-side routing conceptsWhy a single-page React app needs its own router, the History API it's built on, and what you'd have to hand-build without one.Intermediate · 17 min02React Router fundamentalsDeclaring routes with createBrowserRouter, navigating with Link and useNavigate, reading params with useParams — and the framework-mode alternative.Intermediate · 49 min03Nested routes and layoutsSharing a persistent layout across routes with <Outlet>, index routes for the default child, and a worked dashboard example.Intermediate · 39 min04Data loading with router loadersRoute loader and action functions, useLoaderData, and how loading data before render avoids the useEffect loading-spinner waterfall.Intermediate · 25 min01The case for a data-fetching libraryWhy hand-rolled useEffect fetching stops scaling — no caching, no dedup, no refetch-on-focus — and what a dedicated library buys you back.Intermediate · 11 min02TanStack Query fundamentalsuseQuery, query keys, staleTime and gcTime, and the automatic refetching that makes TanStack Query's cache actually stay fresh.Intermediate · 25 min03Caching, invalidation, and mutationsuseMutation, invalidating queries with queryClient.invalidateQueries, and an introduction to optimistic updates and their rollback tradeoff.Intermediate · 1 min04When you need global stateA decision framework for server state, genuinely global client state, and state that should just stay local — before reaching for a store.Intermediate · 14 min05Zustand and minimal state storesZustand's create call and selector hooks as a minimal external store, and why it avoids Context's re-render-everything problem.Intermediate · 20 min06Redux Toolkit for complex appsWhen Redux still earns its complexity, RTK's createSlice and configureStore, and why it replaced hand-written Redux boilerplate.Intermediate · 21 min01Suspense for data fetchingHow a <Suspense> boundary catches a component that is still waiting on data, shows a fallback, and lets useSuspenseQuery replace loading flags.Advanced · 20 min02Error boundariesWhy error boundaries must still be class components, what render-time errors they catch (and what they don't), and the react-error-boundary library.Intermediate · 14 min03Concurrent rendering and transitionsReact 18's concurrent model: renders are now interruptible and can be thrown away, and startTransition marks an update as non-urgent.Advanced · 15 min04useTransition and useDeferredValueuseTransition's pending state for marking your own updates non-urgent, and useDeferredValue for deferring a value you only receive as a prop.Intermediate · 16 min05The use hookReact 19's use() reads a promise or context value and, unlike every other hook, can be called inside an if, a loop, or after an early return.Advanced · 13 min01CSR, SSR, and static rendering conceptsClient-side rendering, server-side rendering, and static generation compared, plus what hydration actually does and why the tradeoffs differ.Intermediate · 49 min02Server Components vs. Client ComponentsWhat React Server Components run and can't run, the 'use client' boundary, and why a component is a Server Component by default.Advanced · 53 min03Server Actions and mutations'use server' functions, calling one from a form action, and how mutating data this way changes the client/server round trip versus REST.Advanced · 20 min01Styling approaches for ReactCSS Modules, CSS-in-JS, and Tailwind compared honestly, including the styled-components backlash, with a short decision guide at the end.Beginner · 6 min02Testing components with React Testing LibraryRTL's "test like a user" philosophy, the getByRole query order, user-event for realistic interactions, and mocking a fetch call.Intermediate · 48 min03Typing props, state, and hooks with TypeScriptTyping component props, children, useState, and useReducer in React, plus writing a generic custom hook. Assumes TypeScript basics.Intermediate · 7 min04Code splitting and lazy loadingReact.lazy and Suspense for code-splitting, why it shrinks your initial bundle, and route-based splitting as the common real-world case.Intermediate · 17 min05Accessibility in React appsSemantic JSX, focus management after route changes and modals, ARIA attributes, and automated testing with axe and jest-axe.Intermediate · 36 min06Choosing a React frameworkA comparative survey of Vite SPAs, Next.js, and React Router's framework mode, and the real factors that should drive the choice.Intermediate · 14 min

React fundamentals

7 lessons

  1. 01 / 07Why React, and the component modelThe manual-DOM pain React was built to remove, what "declarative" actually means, and why a component — not a page — is the unit you build with.13 min
  2. 02 / 07Setting up a React projectCreating a React app with Vite, what Create React App's deprecation means for you, and the files a fresh project actually gives you.16 min
  3. 03 / 07JSX syntax and compilationHow JSX's braces and rules actually work, what it compiles down to, and the places it quietly differs from HTML.9 min
  4. 04 / 07The virtual DOM and reconciliationWhat the virtual DOM actually is, how React diffs trees to update the real DOM efficiently, and where Fiber fits in.14 min
  5. 05 / 07Components and propsWriting function components, passing and reading props, why props are read-only, and what the children prop is for.10 min
  6. 06 / 07Conditional renderingRendering different JSX based on a condition with &&, ternaries, and early returns — and the classic 0 && pitfall that renders a literal zero.12 min
  7. 07 / 07Rendering lists and keysUsing .map() to render a list of elements, why React needs a stable key for each item, and the bug the index-as-key shortcut causes.6 min

State, events, and forms

6 lessons

  1. 01 / 06Handling events in ReactHow JSX wires DOM events to handler functions, what a synthetic event actually is, passing arguments to a handler, and when to call preventDefault.7 min
  2. 02 / 06useState and component stateThe useState hook, why updates are batched, the functional-update form for updates based on previous state, and why state is isolated per component instance.11 min
  3. 03 / 06Lifting state up and compositionSharing state between sibling components by moving it to their closest common parent, and why composition is often a better fix than deeper prop drilling.12 min
  4. 04 / 06Forms and controlled inputsControlled vs. uncontrolled inputs, wiring value and onChange, handling several form fields with one shared handler, and where React 19 form actions fit.9 min
  5. 05 / 06The rules of hooksWhy hooks must only be called at a component's top level and only from components or hooks, how React tracks hook state by call order, and ESLint enforcement.9 min
  6. 06 / 06useReducer for complex stateWhen state logic outgrows useState, the reducer pattern of state, action, and dispatch, the useState vs useReducer tradeoff, and a worked todo-list example.8 min

Effects and refs

6 lessons

  1. 01 / 06The component lifecycle, thought about through hooksWhy mount/update/unmount thinking from class components is the wrong mental model for hooks, and how to think in terms of synchronization instead.24 min
  2. 02 / 06useEffect and synchronizing with external systemsHow useEffect's dependency array is actually compared, the bugs missing or extra dependencies cause, and when you don't need an effect at all.14 min
  3. 03 / 06Data fetching in effectsFetching data inside useEffect with loading and error state, and the honest limits of the pattern before you reach for a data-fetching library.7 min
  4. 04 / 06Cleanup and race conditions in effectsCleanup functions, AbortController, avoiding setState after unmount, and fixing the classic stale-request race condition with a worked example.16 min
  5. 05 / 06useRef and mutable valuesUsing useRef for a mutable value that persists across renders without triggering a re-render — timer ids, previous-value tracking, render counters.10 min
  6. 06 / 06Direct DOM access with refsAttaching a ref to a DOM element, React 19's ref-as-prop versus forwardRef, useImperativeHandle, focus management, and when reaching into the DOM is right.13 min

Performance and memoization

5 lessons

  1. 01 / 05Why React re-rendersWhat actually triggers a React re-render, why it cascades to children by default, and why a re-render is not the same thing as the browser repainting pixels.7 min
  2. 02 / 05useMemo and useCallbackMemoizing an expensive calculation with useMemo and a stable function reference with useCallback, and the dependency-array discipline both demand.25 min
  3. 03 / 05React.memo and component memoizationHow React.memo skips a re-render when props haven't shallowly changed, and the new-object-every-render gotcha that quietly defeats it.10 min
  4. 04 / 05The React Compiler and automatic memoizationHow the stable React Compiler auto-inserts memoization and what it changes about writing useMemo, useCallback, and memo by hand.10 min
  5. 05 / 05Profiling with React DevToolsUsing the React DevTools Profiler's flamegraph and ranked chart to record a session, find a wasted re-render, and trace it back to its trigger.13 min

Component architecture and patterns

6 lessons

  1. 01 / 06Context, and avoiding prop drillingcreateContext and useContext, when reaching for context actually pays off, and why every consumer re-renders when the value changes.13 min
  2. 02 / 06Compound componentsBuilding components that implicitly share state through context, with a worked Tabs/Tab example, and why it beats a prop-heavy API.18 min
  3. 03 / 06Render props and higher-order componentsThe pre-hooks patterns for sharing stateful logic, worked examples of each, and why hooks replaced most of their everyday uses.7 min
  4. 04 / 06Custom hooksExtracting reusable stateful logic into your own hook, the use-prefix convention, and composing built-in hooks inside one, with a worked example.10 min
  5. 05 / 06Controlled vs. uncontrolled componentsWho owns a component's state — itself or its parent — generalized beyond form inputs, and how to design an API that supports both.9 min
  6. 06 / 06PortalscreatePortal, rendering a subtree outside its parent's DOM hierarchy for modals and tooltips, and why events still bubble through the React tree.12 min

Routing

4 lessons

  1. 01 / 04Client-side routing conceptsWhy a single-page React app needs its own router, the History API it's built on, and what you'd have to hand-build without one.17 min
  2. 02 / 04React Router fundamentalsDeclaring routes with createBrowserRouter, navigating with Link and useNavigate, reading params with useParams — and the framework-mode alternative.49 min
  3. 03 / 04Nested routes and layoutsSharing a persistent layout across routes with <Outlet>, index routes for the default child, and a worked dashboard example.39 min
  4. 04 / 04Data loading with router loadersRoute loader and action functions, useLoaderData, and how loading data before render avoids the useEffect loading-spinner waterfall.25 min

Data fetching and state management

6 lessons

  1. 01 / 06The case for a data-fetching libraryWhy hand-rolled useEffect fetching stops scaling — no caching, no dedup, no refetch-on-focus — and what a dedicated library buys you back.11 min
  2. 02 / 06TanStack Query fundamentalsuseQuery, query keys, staleTime and gcTime, and the automatic refetching that makes TanStack Query's cache actually stay fresh.25 min
  3. 03 / 06Caching, invalidation, and mutationsuseMutation, invalidating queries with queryClient.invalidateQueries, and an introduction to optimistic updates and their rollback tradeoff.1 min
  4. 04 / 06When you need global stateA decision framework for server state, genuinely global client state, and state that should just stay local — before reaching for a store.14 min
  5. 05 / 06Zustand and minimal state storesZustand's create call and selector hooks as a minimal external store, and why it avoids Context's re-render-everything problem.20 min
  6. 06 / 06Redux Toolkit for complex appsWhen Redux still earns its complexity, RTK's createSlice and configureStore, and why it replaced hand-written Redux boilerplate.21 min

Concurrent React and Suspense

5 lessons

  1. 01 / 05Suspense for data fetchingHow a <Suspense> boundary catches a component that is still waiting on data, shows a fallback, and lets useSuspenseQuery replace loading flags.20 min
  2. 02 / 05Error boundariesWhy error boundaries must still be class components, what render-time errors they catch (and what they don't), and the react-error-boundary library.14 min
  3. 03 / 05Concurrent rendering and transitionsReact 18's concurrent model: renders are now interruptible and can be thrown away, and startTransition marks an update as non-urgent.15 min
  4. 04 / 05useTransition and useDeferredValueuseTransition's pending state for marking your own updates non-urgent, and useDeferredValue for deferring a value you only receive as a prop.16 min
  5. 05 / 05The use hookReact 19's use() reads a promise or context value and, unlike every other hook, can be called inside an if, a loop, or after an early return.13 min

Server-side React

3 lessons

  1. 01 / 03CSR, SSR, and static rendering conceptsClient-side rendering, server-side rendering, and static generation compared, plus what hydration actually does and why the tradeoffs differ.49 min
  2. 02 / 03Server Components vs. Client ComponentsWhat React Server Components run and can't run, the 'use client' boundary, and why a component is a Server Component by default.53 min
  3. 03 / 03Server Actions and mutations'use server' functions, calling one from a form action, and how mutating data this way changes the client/server round trip versus REST.20 min

React in practice

6 lessons

  1. 01 / 06Styling approaches for ReactCSS Modules, CSS-in-JS, and Tailwind compared honestly, including the styled-components backlash, with a short decision guide at the end.6 min
  2. 02 / 06Testing components with React Testing LibraryRTL's "test like a user" philosophy, the getByRole query order, user-event for realistic interactions, and mocking a fetch call.48 min
  3. 03 / 06Typing props, state, and hooks with TypeScriptTyping component props, children, useState, and useReducer in React, plus writing a generic custom hook. Assumes TypeScript basics.7 min
  4. 04 / 06Code splitting and lazy loadingReact.lazy and Suspense for code-splitting, why it shrinks your initial bundle, and route-based splitting as the common real-world case.17 min
  5. 05 / 06Accessibility in React appsSemantic JSX, focus management after route changes and modals, ARIA attributes, and automated testing with axe and jest-axe.36 min
  6. 06 / 06Choosing a React frameworkA comparative survey of Vite SPAs, Next.js, and React Router's framework mode, and the real factors that should drive the choice.14 min
Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark