## Context in the Classy World

    import React from "react";

    const ThemeContext = React.createContext();

    import React from "react";
    import ThemeContext from "@company/theme-context";

    class App extends React.Component {
      static contextType = ThemeContext;
      componentDidMount() {
        // use this.context.theme for something
      }
      componentDidUpdate() {
        // use this.context.theme for something
      }
      render() {
        return (
          <ThemeContext.Consumer>
            {theme => <div className={theme}>Using theme {this.context.theme}</div>}
          </ThemeContext.Consumer>
        );
      }
    }

    export default App;