Back to Glossary
FrontendIntermediate

What is Context API?

A built-in React feature for passing data through the component tree without manually prop-drilling at every level.

Code Example

const ThemeContext = createContext('light');
const theme = useContext(ThemeContext);