Code Reference

Glossary

React · Reference cheat sheet

Glossary

React · Reference cheat sheet


📋 Overview

Alphabetical glossary of core React terms for components, hooks, rendering, and common UI patterns.

🔧 Core concepts

TermDefinition
ChildrenNested content passed between a component’s opening and closing tags.
ComponentA function or class that returns UI described with JSX/elements.
ConcurrentReact’s ability to interrupt, prioritize, and resume rendering work.
ContextA way to pass data through the tree without prop drilling.
Controlled inputA form element whose value is driven by React state.
Custom hookA function named use* that reuses stateful logic across components.
EffectSide-work scheduled with useEffect after paint (or layout effects).
ElementA plain object describing what to render, usually created via JSX.
Error boundaryA class component that catches render errors in its subtree.
FiberReact’s internal unit of work representing a component instance.
FragmentA wrapper (&lt;>...&lt;/> or <Fragment>) that groups children without a DOM node.
HookA special function that lets function components use state and React features.
HydrationAttaching event handlers to server-rendered HTML on the client.
JSXSyntax extension that looks like HTML and compiles to React.createElement calls.
KeyA stable identity string helping React match list items across updates.
MemoReact.memo or useMemo techniques that skip redundant work.
PortalRendering children into a DOM node outside the parent hierarchy.
PropsInputs passed from parent to child; treated as read-only by the child.
ReconciliationDiffing previous and next trees to decide minimal DOM updates.
RefA mutable container (useRef/createRef) that persists across renders.
RenderCalling a component to produce elements for a given props/state.
StateData owned by a component that triggers re-render when updated.
Strict ModeA development wrapper that highlights unsafe patterns and double-invokes some APIs.
SuspenseA boundary that shows fallback UI while lazy or async children load.
TransitionA lower-priority state update marked with startTransition/useTransition.
Uncontrolled inputA form element that keeps its value in the DOM, often read via a ref.
Virtual DOMThe in-memory element tree React diffs before touching the real DOM.

💡 Examples

State and effect:

function Counter() {
  const [n, setN] = useState(0);
  useEffect(() => {
    document.title = `Count ${n}`;
  }, [n]);
  return <button onClick={() => setN((x) => x + 1)}>{n}</button>;
}

Context and children:

const Theme = createContext("light");
function App({ children }: { children: React.ReactNode }) {
  return <Theme.Provider value="dark">{children}</Theme.Provider>;
}

Keys in lists:

{items.map((item) => (
  <li key={item.id}>{item.label}</li>
))}

⚠️ Pitfalls

  • Confusing props (from parent) with state (owned locally).
  • Mixing controlled and uncontrolled inputs on the same field.
  • Using array index as key when list order or identity can change.
  • Treating memo as free performance — it only helps when props are stable.
  • Equating useEffect with “run on mount only” — dependency arrays control that.

On this page