React
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.
Why 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.Setting 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.JSX syntax and compilationHow JSX's braces and rules actually work, what it compiles down to, and the places it quietly differs from HTML.The virtual DOM and reconciliationWhat the virtual DOM actually is, how React diffs trees to update the real DOM efficiently, and where Fiber fits in.Components and propsWriting function components, passing and reading props, why props are read-only, and what the children prop is for.Conditional renderingRendering different JSX based on a condition with &&, ternaries, and early returns — and the classic 0 && pitfall that renders a literal zero.Rendering 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.Handling 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.useState 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.Lifting 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.Forms 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.The 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.useReducer 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.The 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.useEffect 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.Data 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.Cleanup and race conditions in effectsCleanup functions, AbortController, avoiding setState after unmount, and fixing the classic stale-request race condition with a worked example.useRef and mutable valuesUsing useRef for a mutable value that persists across renders without triggering a re-render — timer ids, previous-value tracking, render counters.Direct 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.Why 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.useMemo and useCallbackMemoizing an expensive calculation with useMemo and a stable function reference with useCallback, and the dependency-array discipline both demand.React.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.The React Compiler and automatic memoizationHow the stable React Compiler auto-inserts memoization and what it changes about writing useMemo, useCallback, and memo by hand.Profiling 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.Context, and avoiding prop drillingcreateContext and useContext, when reaching for context actually pays off, and why every consumer re-renders when the value changes.Compound componentsBuilding components that implicitly share state through context, with a worked Tabs/Tab example, and why it beats a prop-heavy API.Render 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.Custom hooksExtracting reusable stateful logic into your own hook, the use-prefix convention, and composing built-in hooks inside one, with a worked example.Controlled 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.PortalscreatePortal, rendering a subtree outside its parent's DOM hierarchy for modals and tooltips, and why events still bubble through the React tree.Client-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.React Router fundamentalsDeclaring routes with createBrowserRouter, navigating with Link and useNavigate, reading params with useParams — and the framework-mode alternative.Nested routes and layoutsSharing a persistent layout across routes with <Outlet>, index routes for the default child, and a worked dashboard example.Data loading with router loadersRoute loader and action functions, useLoaderData, and how loading data before render avoids the useEffect loading-spinner waterfall.The 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.TanStack Query fundamentalsuseQuery, query keys, staleTime and gcTime, and the automatic refetching that makes TanStack Query's cache actually stay fresh.Caching, invalidation, and mutationsuseMutation, invalidating queries with queryClient.invalidateQueries, and an introduction to optimistic updates and their rollback tradeoff.When 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.Zustand 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.Redux Toolkit for complex appsWhen Redux still earns its complexity, RTK's createSlice and configureStore, and why it replaced hand-written Redux boilerplate.Suspense for data fetchingHow a <Suspense> boundary catches a component that is still waiting on data, shows a fallback, and lets useSuspenseQuery replace loading flags.Error 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.Concurrent rendering and transitionsReact 18's concurrent model: renders are now interruptible and can be thrown away, and startTransition marks an update as non-urgent.useTransition and useDeferredValueuseTransition's pending state for marking your own updates non-urgent, and useDeferredValue for deferring a value you only receive as a prop.The 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.CSR, SSR, and static rendering conceptsClient-side rendering, server-side rendering, and static generation compared, plus what hydration actually does and why the tradeoffs differ.Server 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.Server 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.Styling approaches for ReactCSS Modules, CSS-in-JS, and Tailwind compared honestly, including the styled-components backlash, with a short decision guide at the end.Testing 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.Typing props, state, and hooks with TypeScriptTyping component props, children, useState, and useReducer in React, plus writing a generic custom hook. Assumes TypeScript basics.Code 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.Accessibility in React appsSemantic JSX, focus management after route changes and modals, ARIA attributes, and automated testing with axe and jest-axe.Choosing 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.
React fundamentals
- Why 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.
- Setting 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.
- JSX syntax and compilationHow JSX's braces and rules actually work, what it compiles down to, and the places it quietly differs from HTML.
- The virtual DOM and reconciliationWhat the virtual DOM actually is, how React diffs trees to update the real DOM efficiently, and where Fiber fits in.
- Components and propsWriting function components, passing and reading props, why props are read-only, and what the children prop is for.
- Conditional renderingRendering different JSX based on a condition with &&, ternaries, and early returns — and the classic 0 && pitfall that renders a literal zero.
- Rendering 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.
State, events, and forms
- Handling 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.
- useState 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.
- Lifting 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.
- Forms 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.
- The 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.
- useReducer 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.
Effects and refs
- The 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.
- useEffect 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.
- Data 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.
- Cleanup and race conditions in effectsCleanup functions, AbortController, avoiding setState after unmount, and fixing the classic stale-request race condition with a worked example.
- useRef and mutable valuesUsing useRef for a mutable value that persists across renders without triggering a re-render — timer ids, previous-value tracking, render counters.
- Direct 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.
Performance and memoization
- Why 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.
- useMemo and useCallbackMemoizing an expensive calculation with useMemo and a stable function reference with useCallback, and the dependency-array discipline both demand.
- React.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.
- The React Compiler and automatic memoizationHow the stable React Compiler auto-inserts memoization and what it changes about writing useMemo, useCallback, and memo by hand.
- Profiling 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.
Component architecture and patterns
- Context, and avoiding prop drillingcreateContext and useContext, when reaching for context actually pays off, and why every consumer re-renders when the value changes.
- Compound componentsBuilding components that implicitly share state through context, with a worked Tabs/Tab example, and why it beats a prop-heavy API.
- Render 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.
- Custom hooksExtracting reusable stateful logic into your own hook, the use-prefix convention, and composing built-in hooks inside one, with a worked example.
- Controlled 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.
- PortalscreatePortal, rendering a subtree outside its parent's DOM hierarchy for modals and tooltips, and why events still bubble through the React tree.
Routing
- Client-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.
- React Router fundamentalsDeclaring routes with createBrowserRouter, navigating with Link and useNavigate, reading params with useParams — and the framework-mode alternative.
- Nested routes and layoutsSharing a persistent layout across routes with <Outlet>, index routes for the default child, and a worked dashboard example.
- Data loading with router loadersRoute loader and action functions, useLoaderData, and how loading data before render avoids the useEffect loading-spinner waterfall.
Data fetching and state management
- The 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.
- TanStack Query fundamentalsuseQuery, query keys, staleTime and gcTime, and the automatic refetching that makes TanStack Query's cache actually stay fresh.
- Caching, invalidation, and mutationsuseMutation, invalidating queries with queryClient.invalidateQueries, and an introduction to optimistic updates and their rollback tradeoff.
- When 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.
- Zustand 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.
- Redux Toolkit for complex appsWhen Redux still earns its complexity, RTK's createSlice and configureStore, and why it replaced hand-written Redux boilerplate.
Concurrent React and Suspense
- Suspense for data fetchingHow a <Suspense> boundary catches a component that is still waiting on data, shows a fallback, and lets useSuspenseQuery replace loading flags.
- Error 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.
- Concurrent rendering and transitionsReact 18's concurrent model: renders are now interruptible and can be thrown away, and startTransition marks an update as non-urgent.
- useTransition and useDeferredValueuseTransition's pending state for marking your own updates non-urgent, and useDeferredValue for deferring a value you only receive as a prop.
- The 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.
Server-side React
- CSR, SSR, and static rendering conceptsClient-side rendering, server-side rendering, and static generation compared, plus what hydration actually does and why the tradeoffs differ.
- Server 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.
- Server 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.
React in practice
- Styling approaches for ReactCSS Modules, CSS-in-JS, and Tailwind compared honestly, including the styled-components backlash, with a short decision guide at the end.
- Testing 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.
- Typing props, state, and hooks with TypeScriptTyping component props, children, useState, and useReducer in React, plus writing a generic custom hook. Assumes TypeScript basics.
- Code 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.
- Accessibility in React appsSemantic JSX, focus management after route changes and modals, ARIA attributes, and automated testing with axe and jest-axe.
- Choosing 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.