Skip to content

React: components, hooks, forms and performance

React is a JavaScript library for building user interfaces from components: functions that turn data into UI. You describe what the screen should look like for the current state, and React works out the DOM changes when the state changes. React focuses on rendering; routing, data fetching, forms and builds come from libraries or a framework you choose, which is both its flexibility and the main source of architectural decisions in a React codebase.

This section teaches modern React with function components and hooks, using one invented app throughout: OrdersPortal, a back office for viewing, editing and cancelling orders.

As of November 2026:

Package Version Notes
react, react-dom 19.3 (September 2026) Adds <ViewTransition>, Fragment refs and independent transitions. React 19.0 introduced actions, use, ref as a prop and <Context> as a provider; 19.2 added useEffectEvent and <Activity>.
React Compiler (babel-plugin-react-compiler) 1.0 (October 2025) Automatic memoization at build time.
react-router 8.5 v8 (June 2026) removed react-router-dom; import from react-router and react-router/dom.

The samples on these pages were bundled with esbuild and run in Node.js 22 against these versions, using react-dom/server or a jsdom document; their output is shown under each sample.

Step Page What you get from it
1 What is React? What React solves, what it leaves to other tools, and common misconceptions.
2 Components, props and state JSX, props and composition, useState, lists, keys and conditional rendering.
3 Hooks, effects and context Rules of hooks, useEffect and when not to use it, custom hooks, context.
4 Forms and routing Controlled inputs, form actions with useActionState, React Hook Form with Zod, React Router 8 loaders and actions.
5 Performance Re-renders, memo, useMemo, useCallback, the React Compiler, code splitting, transitions and virtualization.
6 React interview questions Practice questions across the topics above.
If you need Go to
JSX syntax and component structure Components and JSX
children and layout components Props and composition
Keys and list rendering Lists and conditional rendering
useEffect cleanup and dependencies Effects
A reusable data-loading hook Custom hooks
Sharing the current user or theme Context
Form submission and pending state Form actions
Routes, loaders and protected areas Routing with React Router
Slow typing or slow tables Memoization and Transitions and long lists