0
Challenge · 21React Core

Sharing State

Coreused in ~90% of apps

Lifting state works — until you're threading the same prop through five layers. That pain has a name, and a cure.

Core idea. When many components across the tree need the same value, prop-drilling gets painful — which motivates Context and global stores (later tiers).
Playground, this isn't a screenshot
<App />
owns the data
user="Aria"
<Page />
doesn't use it
<Sidebar />
doesn't use it
<Profile />needs the value…
?
waiting for user…
App owns the value. Press play and watch how it reaches Profile.
forced to forward (drilling) reads directly (context)
↑ play a little first, then dig in