How to use the theming.themeListener.subscribe function in theming

To help you get started, we’ve selected a few theming examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / theming / theming-tests.tsx View on Github external
componentDidMount() {
      this.subscription = themeListener.subscribe(this.context, this.setTheme);
    }
    componentWillUnmount() {
github cssinjs / styled-jss / src / styled.js View on Github external
componentDidMount() {
      if (this.state.theme) {
        this.subscriptionId = themeListener.subscribe(this.context, this.setTheme)
      }
    }