Promptles
React & Frontend

Prop Drilling

intermediate

Definition

When a piece of information has to be passed down through many layers of building blocks just to reach the one that actually needs it. The blocks in the middle have to lug it along even though they don't use it themselves: usually a sign that there's a tidier way to share that data.

In the wild

A dark mode setting starts at the top of the app. To get it down to a tiny icon buried six levels deep, every block along the way has to accept it and hand it to the next one: even though only the icon at the bottom actually needs it.

More from React & Frontend