Props Drilling: Passing Data Through Components

Props drilling is passing data through components that don't need it, just to get it to a deeply nested child. It's React's most direct way to share state down the component tree. The footgun: this couples intermediate components to data they never use.
WHY IT EXISTS: React components are isolated by default. To share information, a parent must explicitly pass data (props) to its children. Props drilling is the natural consequence of this one-way data flow when data needs to cross multiple levels of the component tree.
THE MENTAL MODEL: Imagine a top-level component holds user data, but a deeply nested Avatar component needs the user's image URL. The data must be "drilled" down the component tree. The parent passes it to a child, which passes it to its child, and so on. The components in the middle act as simple conduits, passing along props they don't use themselves.
HOW IT WORKS: A parent component passes a prop to a child just like an HTML attribute: <ChildComponent myProp={data} />. The child component receives this prop as an argument in its function signature. If this child has its own child that needs the data, it repeats the process: function ChildComponent({ myProp }) { return <GrandchildComponent myProp={myProp} />; }. This chain continues for as many levels as necessary.
WHEN TO USE IT: Use props drilling for shallow component trees, typically 2-3 levels deep. It is simple, explicit, and makes it easy to trace where data is coming from. It's the default and often best choice before reaching for more complex state management solutions that can add overhead.
WHEN NOT TO USE IT: Avoid props drilling in deeply nested trees. It creates maintenance headaches because intermediate components become unnecessarily coupled to the props they pass through. If you find yourself passing a prop through more than a few layers, consider using React Context or a state management library to provide the data directly to the components that need it, skipping the intermediaries.
ONE CANONICAL EXAMPLE: A Page component receives a 'user' object and needs to render a Profile, which in turn renders an Avatar. The Avatar needs the user object, but the Profile itself does not. The Profile component's only job is to pass the prop along. function Page({ user }) { return <Profile user={user} />; } function Profile({ user }) { return <Avatar user={user} />; } function Avatar({ user }) { return <img src={user.imageUrl} />; } Here, Profile is an intermediate component drilling the 'user' prop down to Avatar.
Read the original → react.dev
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.