Files
react.dev/examples/context/updating-nested-context-context.js
2018-04-09 19:26:30 +01:00

8 lines
241 B
JavaScript

// Make sure the shape of the default value passed to
// createContext matches the shape that the consumers expect!
// highlight-range{2-3}
export const ThemeContext = React.createContext({
theme: themes.dark,
toggleTheme: () => {},
});