Home / Class/ Chrome Class — react Architecture

Chrome Class — react Architecture

Architecture documentation for the Chrome class in Chrome.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  6311044f_10eb_ee12_ee19_7d83e663ee83["Chrome"]
  5c8ed2a6_fcb7_5258_d158_8bd841e362ae["Chrome.js"]
  6311044f_10eb_ee12_ee19_7d83e663ee83 -->|defined in| 5c8ed2a6_fcb7_5258_d158_8bd841e362ae
  00545f0e_011a_f157_275e_a806f7497451["render()"]
  6311044f_10eb_ee12_ee19_7d83e663ee83 -->|method| 00545f0e_011a_f157_275e_a806f7497451

Relationship Graph

Source Code

fixtures/ssr/src/components/Chrome.js lines 9–52

export default class Chrome extends Component {
  state = {theme: 'light'};
  render() {
    const assets = this.props.assets;
    return (
      <html lang="en">
        <head>
          <meta charSet="utf-8" />
          <meta name="viewport" content="width=device-width, initial-scale=1" />
          <link rel="shortcut icon" href="favicon.ico" />
          <link rel="stylesheet" href={assets['main.css']} />
          <title>{this.props.title}</title>
        </head>
        <body className={this.state.theme}>
          <noscript
            dangerouslySetInnerHTML={{
              __html: `<b>Enable JavaScript to run this app.</b>`,
            }}
          />
          <Suspense fallback="Loading...">
            <Theme.Provider value={this.state.theme}>
              <div>
                <ThemeToggleButton
                  onChange={theme => {
                    startTransition(() => {
                      this.setState({theme});
                    });
                  }}
                />
              </div>
              {this.props.children}
            </Theme.Provider>
          </Suspense>
          <LargeContent />
          <script
            dangerouslySetInnerHTML={{
              __html: `assetManifest = ${JSON.stringify(assets)};`,
            }}
          />
        </body>
      </html>
    );
  }
}

Domain

Frequently Asked Questions

What is the Chrome class?
Chrome is a class in the react codebase, defined in fixtures/ssr/src/components/Chrome.js.
Where is Chrome defined?
Chrome is defined in fixtures/ssr/src/components/Chrome.js at line 9.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free