MediumState Management📖 Theory Question

Implement createContext and useContext

Full Answer

Key Insight: Context is a stack, not a single value. Provider pushes, useContext peeks at top, Provider's finally block pops. This is why nested providers work — the innermost one wins.

Practice this in a timed sprint →

5 free questions, no signup required

⚡ Start Sprint