prop drilling
Passing a value through several layers of components that do not use it, just so a deeply nested one can.
In more detail
Drilling makes every middle component depend on data it does not care about. React Context lets the deep component read the value directly from a provider above it.
Related terms
- React Context — A React feature that lets a parent component make a value available to every component below it without passing it as props.
- compound component — A set of components designed to be used together, such as Tabs, Tabs.Trigger and Tabs.Panel, that share state behind the scenes.
- prop — An input passed to a React component, written like an HTML attribute, such as size="lg" in <Button size="lg">.
- Request Memoization — The first Next.js caching tier: identical fetch calls made while rendering one request are run only once.
- props — The inputs passed to a component, written like HTML attributes, such as <Avatar size={48} />.
- composition — Building bigger components by combining smaller ones, often by passing elements in as children or other props.
- lifting state up — Moving state from several child components into their closest common parent so they can share it.
Taught in
- Compound Component Patterns: Context Sharing & Internal State — Design Systems & Component Engineering
- Action State: useActionState & Optimistic Form UI — Next.js 15 & Modern App Router Architecture
- Request Memoization: Automatic Deduplication Tiers — Next.js 15 & Modern App Router Architecture
- Props Contract: Immutability, Children, And Polymorphic Tags — React 19 & Modern Component Architecture
- Complex State with useReducer: State Machines And Action Types — React 19 & Modern Component Architecture
- Lifting State Up: Colocation, Ownership, And Data Flow — React 19 & Modern Component Architecture
- useContext in Depth: Scoping, Consumer Subscription Costs — React 19 & Modern Component Architecture
- Compound Components: Inversion of Control with Context — React 19 & Modern Component Architecture
- Slot Patterns And Headless UI Architecture in React — React 19 & Modern Component Architecture