Level 1 · Apprentice0 XP
Getting a value to distant components, without passing it through every level.
Step 1 / 5
ProblemThe current user is needed by a button deep in the page. Five components in between do not use it. They all receive it and pass it down. Renaming it means editing six files.
Predict first+10 XP
What is prop drilling?
← → step
Before this: Composition over props
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Build a language context with two values (en, fr) and a button that switches. Read it in a component four levels deep without passing props. Then add a console.log in three readers and see how many render on a switch.