jsx// Create const ThemeContext = createContext('light'); // Provide <ThemeContext.Provider value={theme}> <App /> </ThemeContext.Provider> // Consume const theme = useContext(ThemeContext);
When Provider value changes → all consumers re-render, regardless of whether they use the changed part.