API reference

Every hook, component and API the guide covers, the version it arrived in, and where it is taught. Use it as a checklist before an interview.

77 entries
NameSinceWhat it doesChapter
useState16.8Component state that triggers a re-render when set.12. State
useReducer16.8State updated through a pure reducer function.13. useReducer
useContext16.8Read a context value from the nearest provider.16. Context
useRef16.8A mutable box that survives renders without causing them.14. Refs
useImperativeHandle16.8Customize what a parent gets through a ref.14. Refs
useEffect16.8Synchronize with an external system after commit.15. Effects
useLayoutEffect16.8Effect that runs before the browser paints.15. Effects
useInsertionEffect18Effect for CSS-in-JS libraries to inject styles before layout.15. Effects
useEffectEvent19.2A non-reactive event function you can call from an effect.15. Effects
useMemo16.8Cache a computed value between renders.29. Memoization
useCallback16.8Cache a function identity between renders.29. Memoization
useTransition18Mark updates as non-blocking and get a pending flag.24. Transitions
useDeferredValue18Let a value lag behind during urgent updates.24. Transitions
useId18Stable unique ids that match between server and client.17. Custom hooks
useSyncExternalStore18Subscribe to an external store without tearing.33. Build a store
useDebugValue16.8Label a custom hook in React DevTools.17. Custom hooks
useActionState19.0State updated by an Action, with a pending flag.25. Actions
useOptimistic19.0Show an optimistic value while an Action is in flight.25. Actions
NameSinceWhat it doesChapter
<Fragment>16.2Group children without a wrapper element. Accepts a ref since 19.3.10. Components and props
Fragment refs19.3A FragmentInstance for focus, events and observers over a fragment's children.14. Refs
<StrictMode>16.3Development checks that double-invoke renders and effects.15. Effects
<Suspense>16.6Show a fallback while children are waiting.26. Suspense and use
<Profiler>16.5Measure render timings of a subtree.22. Portals and Profiler
<Activity>19.2Hide UI while keeping its state, and pre-render it.27. Activity and View Transitions
<ViewTransition>19.3Animate between UI states with the View Transition API.27. Activity and View Transitions
<Context> as provider19.0Render a context directly instead of Context.Provider.16. Context
NameSinceWhat it doesChapter
use19.0Read a promise or context during render; can be conditional.26. Suspense and use
createElement0.xCreate a React element. What JSX compiles to (classic runtime).3. Elements and JSX
jsx() runtime17The automatic JSX runtime the compiler emits.3. Elements and JSX
createContext16.3Create a context object.16. Context
memo16.6Skip re-rendering when props are shallow-equal.29. Memoization
lazy16.6Load a component's code on first render.26. Suspense and use
startTransition18Mark an update as a transition outside components.24. Transitions
addTransitionType19.3Tag a transition so view transitions can animate by type.27. Activity and View Transitions
captureOwnerStack19.1Read the component owner stack in development.21. Errors
act18.3Flush updates and effects in tests (exported from react).56. Testing
NameSinceWhat it doesChapter
useFormStatus19.0Read the pending state of the parent form (react-dom).25. Actions
createRoot18Create a concurrent root and render into a DOM node.4. Rendering elements
hydrateRoot18Attach React to server-rendered HTML.43. SSR and hydration
root error options19.0onCaughtError, onUncaughtError and onRecoverableError on roots.21. Errors
createPortal16Render children into another DOM node.22. Portals and Profiler
flushSync16Force React to apply an update synchronously.23. Rendering and scheduling
preload, preinit, preconnect, prefetchDNS19.0Tell the browser about resources early.43. SSR and hydration
requestFormReset19.0Reset a form after an Action, inside a transition.25. Actions
Document metadata19.0<title>, <meta> and <link> rendered anywhere are hoisted to <head>.43. SSR and hydration
browser()19.3use(browser()) defers part of a tree to the browser after hydration.43. SSR and hydration
preinitModule, preloadModule19.0The same early-resource hints for ES modules.43. SSR and hydration
<form action={fn}>19.0Built-in form component: pass a function and React runs it as an Action.25. Actions
<input>, <select>, <textarea>0.xBuilt-in form fields, controlled with value and onChange or uncontrolled with defaultValue.19. Forms
NameSinceWhat it doesChapter
cache19.0Memoize a function per server request (Server Components).44. Server Components
cacheSignal19.2An AbortSignal for the lifetime of cache() in a request.44. Server Components
renderToString0.xLegacy synchronous render to HTML. No streaming or Suspense data.43. SSR and hydration
renderToReadableStream18Stream HTML in Web Streams environments.43. SSR and hydration
renderToPipeableStream18Stream HTML in Node.js.43. SSR and hydration
prerender19.0Render to static HTML, waiting for all data (react-dom/static).43. SSR and hydration
resume and resumeAndPrerender19.2Finish a partially prerendered shell later.43. SSR and hydration
prerenderToNodeStream19.0prerender for Node.js streams (react-dom/static).43. SSR and hydration
resumeToPipeableStream, resumeAndPrerenderToNodeStream19.2The Node.js stream versions of resume and resumeAndPrerender.43. SSR and hydration
renderToStaticMarkup0.xRender non-interactive HTML with no hydration markers, e.g. for emails.43. SSR and hydration
Taint APIsexperimentalexperimental_taintObjectReference and taintUniqueValue keep secrets off the client.45. Server Functions
NameSinceWhat it doesChapter
"use client"19.0Marks the boundary where client components start.44. Server Components
"use server"19.0Marks Server Functions callable from the client.45. Server Functions
NameSinceWhat it doesChapter
babel-plugin-react-compilerCompiler 1.0Automatic memoization at build time.30. The React Compiler
"use memo" and "use no memo"Compiler 1.0Opt a function into or out of compilation.30. The React Compiler
eslint-plugin-react-hooksCompiler 1.0Rules of Hooks plus the Compiler's rules (recommended-latest).58. Tooling and DX
NameSinceWhat it doesChapter
forwardRef16.3Pass a ref through a component. Not needed since ref is a prop in 19.14. Refs
Component and PureComponent0.xClass components and the shallow-compare base class.20. Class components
createRef16.3Ref object for class components.20. Class components
Children, cloneElement, isValidElement0.xLegacy helpers for inspecting and copying elements.20. Class components
useFormStatecanaryThe canary name for useActionState, still exported by react-dom but deprecated. Rename it.61. React versions
unstable_batchedUpdates0.xManual batching. Redundant since React 18 batches every update automatically.61. React versions
NameSinceWhat it doesChapter
"use cache", cacheLife, cacheTagNext 16Opt-in caching under Cache Components.48. Caching in Next.js
revalidateTag, updateTag, refreshNext 16Invalidate cached data after a write.48. Caching in Next.js
proxy.tsNext 16Request interception, formerly middleware.ts.47. Data and mutations in Next.js
generateStaticParamsNext 13.4Prerender dynamic routes at build time.49. Rendering and deploying Next.js
after()Next 15Run work after the response is sent.47. Data and mutations in Next.js