Every topic.
One place to learn.
Choose a topic, follow the colored flow, then compare what changes in another example. Open the official reference when you want to go deeper.
Coverage follows the official Learn and Reference navigation. Each lab introduces a topic through a guided conceptual model; the linked documentation contains the complete API details and caveats. Experimental and legacy topics are identified separately.
178 results
Components
Same code. Separate lives.
Visual lab · Learn ReactJSX
Expressions become UI.
Visual lab · Learn ReactProps
One value. Two components.
Visual lab · React referenceState
A component with memory.
Visual lab · Learn ReactEvents
One click. A chain of events.
Visual lab · Learn ReactRendering
Render is not repaint.
Visual lab · Rules and lintingHooks
Same calls. Remembered values.
Visual lab · React referenceEffects
Commit. Clean up. Set up.
Visual lab · React referenceContext
A value across the tree.
Visual lab · React referenceRefs
Remember without rendering.
Visual lab · React referencePerformance
A render you can skip.
Visual lab · Learn ReactConditional rendering
One condition chooses which UI to describe.
Visual lab · Learn ReactLists and keys
Keys connect an item to its component identity.
Visual lab · Learn ReactState snapshots
A handler keeps the values from its own render.
Visual lab · Learn ReactState update queues
A queue explains why three updates can mean +1 or +3.
Visual lab · Learn ReactUpdating objects
Replace an object while preserving the previous snapshot.
Visual lab · Learn ReactUpdating arrays
Create the next collection instead of editing state in place.
Visual lab · Learn ReactSharing state
Move shared information to the closest common owner.
Visual lab · Learn ReactPreserving and resetting state
Type, position and key determine which state belongs to a component.
Visual lab · Learn ReactReducers
An action describes what happened; a reducer computes next state.
Visual lab · Learn ReactYou might not need an Effect
Calculate display values directly from existing state.
Visual lab · Learn ReactEffect dependencies
Changed dependencies replace an old synchronization with a new one.
Visual lab · Learn ReactCustom Hooks
Share a stateful recipe while keeping each call independent.
Visual lab · React referenceStrictMode checks
Development checks reveal missing cleanup before users encounter it.
Visual lab · React referenceSuspense boundaries
A boundary provides UI while supported child work is pending.
Visual lab · React referenceTransitions
Urgent input can interrupt non-blocking rendering work.
Visual lab · React DOMHydration
Connect React to HTML that was already rendered on the server.
Visual lab · React DOMPortals
DOM placement can change without changing React ancestry.
Visual lab · React DOMHooks
A nested submit control reads its parent form’s submission status.
Visual lab · React DOMuseFormStatus
A nested submit control reads its parent form’s submission status.
Visual lab · React DOMComponents
HTML and SVG elements describe browser UI through React props.
Visual lab · React DOMCommon (e.g. <div>)
Common props connect browser elements to styles, accessibility and events.
Visual lab · React DOM<form>
A form gathers named controls and submits their values.
Visual lab · React DOM<input>
A controlled field displays its React value; user edits must update that value.
Visual lab · React DOM<textarea>
A controlled field displays its React value; user edits must update that value.
Visual lab · React DOM<select>
A controlled field displays its React value; user edits must update that value.
Visual lab · React DOM<option>
An option supplies a value for its parent select control.
Visual lab · React DOM<progress>
A progress indicator distinguishes known completion from unknown duration.
Visual lab · React DOM<title>
Document metadata describes the page outside its visible content.
Visual lab · React DOM<meta>
Document metadata describes the page outside its visible content.
Visual lab · React DOM<link>
A stylesheet link can participate in React’s resource ordering.
Visual lab · React DOM<style>
An inline stylesheet can be managed as a named document resource.
Visual lab · React DOM<script>
Async external scripts can be managed as document resources.
Visual lab · React DOMAPIs
Browser-specific APIs connect React with DOM placement and synchronous integrations.
Visual lab · React DOMbrowser
A browser-only boundary avoids rendering browser-dependent content on the server.
Visual lab · React DOMflushSync
Flush a state update before a synchronous browser integration continues.
Visual lab · React DOMprefetchDNS
prefetchDNS requests earlier dns lookup for a resource the page expects to need.
Visual lab · React DOMpreconnect
preconnect requests earlier connection setup for a resource the page expects to need.
Visual lab · React DOMpreload
preload requests earlier resource fetch for a resource the page expects to need.
Visual lab · React DOMpreloadModule
preloadModule requests earlier module fetch for a resource the page expects to need.
Visual lab · React DOMpreinit
preinit requests earlier fetch and apply css for a resource the page expects to need.
Visual lab · React DOMpreinitModule
preinitModule requests earlier fetch and evaluate for a resource the page expects to need.
Visual lab · React DOMClient APIs
A client root lets React own the content of a browser container.
Visual lab · React DOMcreateRoot
A client root lets React own the content of a browser container.
Visual lab · Server ReactrenderToPipeableStream
renderToPipeableStream sends HTML through a Node.js stream.
Visual lab · Server ReactrenderToReadableStream
renderToReadableStream sends HTML through a Web stream.
Visual lab · Server ReactrenderToString
Generate an HTML string from a React tree without incremental streaming.
Visual lab · Server ReactrenderToStaticMarkup
Generate an HTML string from a React tree without incremental streaming.
Visual lab · Server ReactServer APIs
Server rendering produces HTML; the chosen API determines streaming and waiting behavior.
Visual lab · Server Reactprerender
Prerendering waits for supported data to produce a static prelude.
Visual lab · Server ReactprerenderToNodeStream
Prerendering waits for supported data to produce a static prelude.
Visual lab · Server Reactresume
Continue matching postponed rendering work using its saved state.
Visual lab · Server ReactresumeToPipeableStream
Continue matching postponed rendering work using its saved state.
Visual lab · Server ReactresumeAndPrerender
Continue matching postponed rendering work using its saved state.
Visual lab · Server ReactresumeAndPrerenderToNodeStream
Continue matching postponed rendering work using its saved state.
Visual lab · Server ReactStatic APIs
Static rendering prepares HTML ahead of delivery and can preserve postponed work.
Visual lab · Server ReactServer Components
Server Components run outside the client bundle and pass renderable results across a boundary.
Visual lab · Server ReactServer Functions
A Server Function lets client code request an async operation on the server.
Visual lab · Server React'use server'
A Server Function lets client code request an async operation on the server.
Visual lab · Server ReactDirectives
A client directive marks a module boundary rather than a DOM subtree.
Visual lab · Server React'use client'
A client directive marks a module boundary rather than a DOM subtree.
Visual lab · Learn ReactQuick Start
Components describe the screen, and state connects interactions to fresh UI.
Visual lab · Learn ReactTutorial: Tic-Tac-Toe
Immutable move snapshots let a game preserve history and reject invalid moves.
Visual lab · Learn ReactThinking in React
Choose minimal state in a common owner and derive the visible view from it.
Visual lab · Learn ReactInstallation
Start in a sandbox to learn, or prepare a local toolchain for a project.
Visual lab · Learn ReactCreating a React App
A framework supplies application infrastructure and can support different rendering strategies.
Visual lab · Learn ReactBuild a React App from Scratch
A build tool handles modules and JSX while you choose application features such as routing.
Visual lab · Learn ReactAdd React to an Existing Project
Mount React in a chosen container to adopt it without replacing every existing page.
Visual lab · Learn ReactSetup
Editor checks and runtime inspection answer different questions about a React project.
Visual lab · Learn ReactEditor Setup
Linting finds suspicious code and formatting makes code layout consistent.
Visual lab · Learn ReactUsing TypeScript
Type annotations describe component contracts and narrow the values your code can use.
Visual lab · Learn ReactReact Developer Tools
React DevTools reveals component data and records rendering activity to guide debugging.
Visual lab · Learn ReactDescribing the UI
A component combines data and JSX to describe the UI for a particular situation.
Visual lab · Learn ReactImporting and Exporting Components
Module exports determine the import syntax that makes a component available elsewhere.
Visual lab · Learn ReactWriting Markup with JSX
JSX groups UI into a JavaScript expression and uses explicit tag and attribute syntax.
Visual lab · Learn ReactKeeping Components Pure
Pure rendering calculates JSX without changing values that existed before the render.
Visual lab · Learn ReactYour UI as a Tree
The render tree shows component parents while the module tree shows file dependencies.
Visual lab · Learn ReactAdding Interactivity
Event handlers request state changes, and each handler reads the state snapshot from its render.
Visual lab · Learn ReactState: A Component's Memory
State remembers a value between renders and a setter requests an updated screen.
Visual lab · Learn ReactManaging State
Put coordinated values in one owner and derive each dependent view from that state.
Visual lab · Learn ReactReacting to Input with State
Describe form states explicitly and derive controls from the current state.
Visual lab · Learn ReactChoosing the State Structure
Store the smallest consistent facts and calculate information that follows from them.
Visual lab · Learn ReactPassing Data Deeply with Context
A consumer reads the closest matching provider above it, or the context default if none exists.
Visual lab · Learn ReactScaling Up with Reducer and Context
Context distributes shared state and dispatch while a reducer centralizes state transitions.
Visual lab · Learn ReactEscape Hatches
Refs reach imperative browser capabilities and Effects synchronize external systems with rendered state.
Visual lab · Learn ReactReferencing Values with Refs
A ref retains mutable information without making its changes trigger rendering.
Visual lab · Learn ReactManipulating the DOM with Refs
A DOM ref gives event handlers access to mounted elements for focus, scrolling, or measurement.
Visual lab · Learn ReactSynchronizing with Effects
Effects start synchronization after commit and clean up before restarting with changed dependencies.
Visual lab · Learn ReactSeparating Events from Effects
Event handlers respond to interactions while Effects follow reactive values and Effect Events read current nonreactive data.
Visual lab · Learn ReactRemoving Effect Dependencies
Change Effect code to remove unnecessary reactive inputs instead of suppressing dependency checks.
Visual lab · CompilerReact Compiler
React Compiler adds automatic memoization during your build.
Visual lab · CompilerIntroduction
The compiler optimizes React components and Hooks rather than every JavaScript function.
Visual lab · CompilerInstallation
Install the compiler in the build path before other Babel transformations.
Visual lab · CompilerIncremental Adoption
Incremental adoption limits which files or functions the compiler processes.
Visual lab · CompilerDebugging and Troubleshooting
Compare compiled and uncompiled behavior to isolate a compiler-related issue.
Visual lab · CompilerConfiguration
Compiler options separately control selection, compatibility, and error handling.
Visual lab · CompilercompilationMode
compilationMode decides which functions are candidates for optimization.
Visual lab · Compilergating
gating emits original and optimized versions and selects one with an imported boolean function.
Visual lab · Compilerlogger
logger exposes build-time compiler events for coverage and diagnostics.
Visual lab · CompilerpanicThreshold
panicThreshold decides whether compiler diagnostics stop the build.
Visual lab · Compilertarget
target selects the compiler runtime compatible with your React major version.
Visual lab · CompilerDirectives
Compiler directives give a function explicit opt-in or opt-out behavior.
Visual lab · Compiler"use memo"
use memo explicitly marks a function for compiler analysis.
Visual lab · Compiler"use no memo"
use no memo temporarily excludes a function from compiler optimization.
Visual lab · CompilerCompiling Libraries
Library authors can ship compiled code with compatible runtime dependencies.
Visual lab · Developer toolsReact Performance tracks
React Performance tracks add React context to supported browser performance recordings.
Visual lab · Rules and lintingLints
The Hooks ESLint plugin checks both React rules and compiler diagnostics.
Visual lab · Rules and lintingexhaustive-deps
exhaustive-deps finds reactive values omitted from Hook dependency arrays.
Visual lab · Rules and lintingrules-of-hooks
rules-of-hooks checks that ordinary Hooks are called consistently from React functions.
Visual lab · Rules and lintingcomponent-hook-factories
component-hook-factories discourages functions that manufacture nested component or Hook definitions.
Visual lab · Rules and lintingconfig
config diagnoses invalid compiler option names and values.
Visual lab · Rules and lintingerror-boundaries
error-boundaries warns when try/catch is used to handle a child rendering error.
Visual lab · Rules and lintinggating
The gating lint validates the module and export used for compiler feature flags.
Visual lab · Rules and lintingglobals
globals flags writes to shared values during rendering.
Visual lab · Rules and lintingimmutability
immutability catches changes to props and state that should be treated as snapshots.
Visual lab · Rules and lintingincompatible-library
incompatible-library identifies known APIs whose changing results are unsafe to memoize by function identity.
Visual lab · Rules and lintingpreserve-manual-memoization
preserve-manual-memoization checks whether compiler inference preserves existing memoization.
Visual lab · Rules and lintingpurity
purity catches known nondeterministic calls in rendering.
Visual lab · Rules and lintingrefs
refs checks render-time reads and writes of values inferred to be refs.
Visual lab · Rules and lintingset-state-in-effect
set-state-in-effect identifies avoidable synchronous state updates inside Effects.
Visual lab · Rules and lintingset-state-in-render
set-state-in-render rejects unconditional state setters in rendering.
Visual lab · Rules and lintingstatic-components
static-components catches component types recreated during another component render.
Visual lab · Rules and lintingunsupported-syntax
unsupported-syntax identifies JavaScript constructs the compiler cannot safely analyze.
Visual lab · Rules and lintinguse-memo
use-memo detects useMemo callbacks that forget to return a value.
Visual lab · Rules and lintingOverview
The Rules of React make rendering predictable and state ownership explicit.
Visual lab · Rules and lintingComponents and Hooks must be pure
Pure rendering may mutate fresh local data but must not mutate data shared between renders.
Visual lab · Rules and lintingReact calls Components and Hooks
JSX lets React own component identity and decide when component functions run.
Visual lab · React referenceOverview
The reference separates component features from platform rendering and build tools.
Visual lab · React referenceHooks
Hooks connect function components to state, context, refs, and synchronization.
Visual lab · React referenceuseActionState
useActionState carries each Action result into the next Action invocation.
Visual lab · React referenceuseCallback
useCallback preserves a function identity while its dependencies stay equal.
Visual lab · React referenceuseDebugValue
useDebugValue gives a custom Hook a readable label in React DevTools.
Visual lab · React referenceuseDeferredValue
useDeferredValue lets a less urgent view temporarily use an older value.
Visual lab · React referenceuseEffectEvent
useEffectEvent reads current values in Effect callbacks without making those reads reactive.
Visual lab · React referenceuseId
useId generates an instance-specific identifier for accessible relationships.
Visual lab · React referenceuseImperativeHandle
useImperativeHandle exposes selected imperative methods through a component ref.
Visual lab · React referenceuseInsertionEffect
useInsertionEffect gives styling libraries a place to install CSS before layout Effects.
Visual lab · React referenceuseLayoutEffect
useLayoutEffect can measure committed layout and update before the browser paints.
Visual lab · React referenceuseMemo
useMemo caches a calculated value until a dependency changes.
Visual lab · React referenceuseOptimistic
useOptimistic shows a temporary value while an Action settles the authoritative value.
Visual lab · React referenceuseReducer
useReducer routes actions through a pure function to calculate the next state.
Visual lab · React referenceuseSyncExternalStore
useSyncExternalStore subscribes React to a store that lives outside React state.
Visual lab · React referenceComponents
Built-in components change how React groups, reveals, and observes a subtree.
Visual lab · React reference<Fragment> (<>)
Fragment groups children without inserting an extra DOM element.
Visual lab · React reference<Profiler>
Profiler reports commit-related rendering measurements for a chosen subtree.
Visual lab · React reference<Activity>
Activity hides a subtree while retaining its state and cleaning up its Effects.
Visual lab · React reference<ViewTransition>
ViewTransition animates participating DOM changes triggered by Transitions or Suspense.
Visual lab · React referenceAPIs
React APIs provide reusable building blocks outside the ordinary Hook lifecycle.
Visual lab · React referenceact
await act groups test interactions and flushes their React updates before assertions.
Visual lab · React referenceaddTransitionType
addTransitionType tags a Transition so its cause can select animation styling.
Visual lab · React referencecache
cache shares a function result for matching arguments during a Server Component render request.
Visual lab · React referencecacheSignal
cacheSignal exposes when the current server render cache lifetime ends.
Visual lab · React referencecaptureOwnerStack
captureOwnerStack provides development diagnostics about the components that created an element.
Visual lab · React referencecreateContext
createContext defines a channel whose nearest provider supplies descendant values.
Visual lab · React referencelazy
lazy waits for a loader’s default component and reuses the loaded result.
Visual lab · React referencestartTransition
startTransition marks state updates as interruptible background rendering work.
Visual lab · React referenceuse
use reads a Promise or context and integrates pending Promises with Suspense.
Visual lab · Experimentalexperimental_taintObjectReference
Tainting an object reference blocks that particular instance from crossing to Client Components.
Visual lab · Experimentalexperimental_taintUniqueValue
Tainting a unique value blocks that exact value while its lifetime object remains reachable.
Visual lab · Legacy ReactLegacy React APIs
Legacy APIs remain documented for existing code while newer code usually uses functions and Hooks.
Visual lab · Legacy ReactChildren
Children inspects the received children structure without rendering nested components.
Visual lab · Legacy ReactcloneElement
cloneElement creates a new element by shallowly overriding props on an existing element.
Visual lab · Legacy ReactComponent
Component defines class-based UI with instance props, state, and lifecycle methods.
Visual lab · Legacy ReactcreateElement
createElement describes a React element without using JSX syntax.
Visual lab · Legacy ReactcreateRef
createRef creates a mutable ref object commonly stored on a class instance.
Visual lab · Legacy ReactforwardRef
forwardRef passes a parent ref through a function component to a chosen target.
Visual lab · Legacy ReactisValidElement
isValidElement checks for a React element rather than every value React can render.
Visual lab · Legacy ReactPureComponent
PureComponent shallowly compares class props and state to skip unchanged work.