arrow_backBACK TO DRILLS
Black Belt - HardcontextPREMIUM
useContext Without a Matching Provider
Consider this component tree with no Provider present anywhere above ThemeLabel:
//REACT_MODULE
const ThemeContext = createContext(null);
function ThemeLabel() {
const { mode } = useContext(ThemeContext);
return <span>{mode}</span>;
}
function App() {
return <ThemeLabel />;
}What happens when App renders?