// Theme context, default to light theme
// highlight-next-line
const ThemeContext = React.createContext('light');
// Signed-in user context
// highlight-next-line
const UserContext = React.createContext();
// An intermediate component that depends on both contexts
function Toolbar(props) {
// highlight-range{2-10}
return (
{theme => (
{user => (
)}
)}
);
}
class App extends React.Component {
render() {
const {signedInUser, theme} = this.props;
// App component that provides initial context values
// highlight-range{2-3,5-6}
return (
);
}
}