React Reference

This section documents React 19.x for the web, using function components and Hooks throughout (class components appear only where React still requires them, such as error boundaries). React Native is out of scope and gets only a pointer. The React 19 additions follow the current official React documentation. This content was generated with the assistance of AI and should be verified against react.dev before being relied on in production, since React APIs continue to evolve between releases.

This section’s bibliography lists the reference material consulted while preparing these pages.

Welcome to the React reference. React is a declarative, component-based JavaScript library for building user interfaces: you describe the UI for each state, and React updates the DOM to match. This section documents React 19 for the web, using function components and Hooks throughout.

If you are new to React, start with Getting Started with React and JSX and Rendering, then work down the list or jump to what you need.

What’s covered

Fundamentals

  • Getting Started with React — what React is, the virtual DOM and reconciliation, what is new in React 19, and creating an app with a framework or with Vite.

  • JSX and Rendering — JSX syntax, embedding expressions with curly braces, conditional rendering, rendering lists with keys, and mounting a tree with createRoot.

  • Components and Props — function components, passing and reading props, children, one-way data flow, composition over inheritance, and keeping components pure.

  • State and Events — event handlers and the SyntheticEvent, useState, the render/commit cycle, batching and updater functions, and immutable object/array updates.

Hooks & effects

  • Core Hooks and the Rules of Hooks — the Rules of Hooks, useState vs. useReducer, useRef and useId, and a reference table of every built-in Hook.

  • Effects and Lifecycle — useEffect, dependency arrays and cleanup, fetching with a race guard, "you might not need an Effect", useEffectEvent, and useLayoutEffect.

  • Custom Hooks — extracting stateful logic into use* functions, and worked examples (useToggle, useLocalStorage, useDebounce, useFetch, useOnlineStatus).

State, performance & Suspense

  • State Management — lifting state up, controlled vs. uncontrolled inputs, structuring state, Context, the reducer + context pattern, and third-party libraries.

  • Performance and Concurrent Features — measuring re-renders, memo / useMemo / useCallback, the React Compiler, useTransition and useDeferredValue.

  • Code Splitting and Suspense — lazy + <Suspense>, route-based splitting, Suspense for data and the use API, and error boundaries.

Forms, routing & data

  • Forms and Actions — controlled inputs, and the React 19 Actions model with useActionState, useFormStatus, and useOptimistic.

  • Routing — a brief orientation: React ships no router; the options, and minimal React Router examples.

  • Data Fetching — fetch in an Effect and its problems, axios, TanStack Query / SWR, GraphQL clients, and framework data loading.

  • Refs and the DOM — useRef for non-rendering values, DOM refs, ref as a prop in React 19, useImperativeHandle, and flushSync.

TypeScript & testing

  • TypeScript with React — typing props, children, hooks, and events; generic components and utility types; and the removal of PropTypes in React 19.

  • Testing — the test pyramid, Jest / Vitest setup, React Testing Library and act(), mocking the network with MSW, testing Hooks, and end-to-end tests with Playwright and Cypress.

Rendering, build & delivery

  • Server Rendering, SSG and React Server Components — CSR/SSR/SSG/ISR, hydration, react-dom/server and streaming, RSC and Server Functions, and an SEO-friendly e-commerce example.

  • Build and Deployment — what a bundler does, building with Vite, the three deployment models, and a worked Vite SPA on AWS S3 + CloudFront.

  • Styling and UI Libraries — CSS Modules, Tailwind, CSS-in-JS, component libraries (MUI, Ant Design, Chakra UI, PrimeReact, gluestack, Radix), and accessibility of interactive components.

Reference

  • The Rules of React — purity and idempotency, no side effects in render, immutable props and state, letting React call your components and Hooks, and the Rules of Hooks.

  • Cheat sheet — a one-page, downloadable PDF summary of the essentials above for quick memorization.

Bibliography