Passing data down through many layers of components as props — prop drilling — becomes tedious and brittle when deeply nested components need values from far up the tree. The Context API solves this by letting a provider make a value available to any descendant directly, without threading it through every intermediate component. It is React's built-in mechanism for sharing data widely.
Context suits values that many components across the tree need: the current theme, the authenticated user, the locale, or app-wide settings. You create a context, wrap a part of the tree in its provider with a value, and any descendant reads that value with the useContext hook (or the use hook in React 19), no matter how deep.
But context is not a general state-management solution, and overusing it causes performance and complexity problems. This lesson covers creating and consuming context, the React 19 ergonomics, the common pattern of pairing context with a reducer, and — importantly — when context is the right tool versus when to lift state or reach for a dedicated library.