Home / File/ Example.js — react Source File

Example.js — react Source File

Architecture documentation for Example.js, a javascript file in the react codebase. 9 imports, 0 dependents.

File javascript BabelCompiler Optimization 9 imports 1 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  2630ae57_7cdf_3d8c_c26e_5a67044aaba2["Example.js"]
  c10b0afa_062b_9e15_7167_461fafca173b["BabelClasses-compiled.js"]
  2630ae57_7cdf_3d8c_c26e_5a67044aaba2 --> c10b0afa_062b_9e15_7167_461fafca173b
  cb9df707_efe8_b470_c58c_2b7308846a1a["BabelClass"]
  2630ae57_7cdf_3d8c_c26e_5a67044aaba2 --> cb9df707_efe8_b470_c58c_2b7308846a1a
  d049587a_aca4_1375_34c2_e8c16c83672e["BabelClassWithFields"]
  2630ae57_7cdf_3d8c_c26e_5a67044aaba2 --> d049587a_aca4_1375_34c2_e8c16c83672e
  733c9d73_a980_7c37_1789_75d6565f5ac4["Components.js"]
  2630ae57_7cdf_3d8c_c26e_5a67044aaba2 --> 733c9d73_a980_7c37_1789_75d6565f5ac4
  a3b8c4bf_214a_89a8_16ff_c79b106ee795["Throw"]
  2630ae57_7cdf_3d8c_c26e_5a67044aaba2 --> a3b8c4bf_214a_89a8_16ff_c79b106ee795
  6dd9734e_fa66_72df_b1df_a993f658f56d["Component"]
  2630ae57_7cdf_3d8c_c26e_5a67044aaba2 --> 6dd9734e_fa66_72df_b1df_a993f658f56d
  92cd8d25_0acc_7b7d_6595_677b38731e97["DisplayName"]
  2630ae57_7cdf_3d8c_c26e_5a67044aaba2 --> 92cd8d25_0acc_7b7d_6595_677b38731e97
  907f4afb_824c_6966_91b9_dedf2736ce4d["NativeClass"]
  2630ae57_7cdf_3d8c_c26e_5a67044aaba2 --> 907f4afb_824c_6966_91b9_dedf2736ce4d
  9ce74e48_7849_ab8a_c352_c3681c29b7e0["FrozenClass"]
  2630ae57_7cdf_3d8c_c26e_5a67044aaba2 --> 9ce74e48_7849_ab8a_c352_c3681c29b7e0
  style 2630ae57_7cdf_3d8c_c26e_5a67044aaba2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {BabelClass, BabelClassWithFields} from './BabelClasses-compiled.js';
import {
  Throw,
  Component,
  DisplayName,
  NativeClass,
  FrozenClass,
} from './Components.js';

const x = React.createElement;

class ErrorBoundary extends React.Component {
  static getDerivedStateFromError(error) {
    return {
      error: error,
    };
  }

  componentDidCatch(error, errorInfo) {
    console.log(error.message, errorInfo.componentStack);
    this.setState({
      componentStack: errorInfo.componentStack,
    });
  }

  render() {
    if (this.state && this.state.error) {
      return x(
        'div',
        null,
        x('h3', null, this.state.error.message),
        x('pre', null, this.state.componentStack)
      );
    }
    return this.props.children;
  }
}

export default function Example() {
  let state = React.useState(false);
  return x(
    ErrorBoundary,
    null,
    x(
      DisplayName,
      null,
      x(
        NativeClass,
        null,
        x(
          FrozenClass,
          null,
          x(
            BabelClass,
            null,
            x(
              BabelClassWithFields,
              null,
              x(
                React.Suspense,
                null,
                x('div', null, x(Component, null, x(Throw)))
              )
            )
          )
        )
      )
    )
  );
}

Domain

Subdomains

Functions

Classes

Frequently Asked Questions

What does Example.js do?
Example.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Optimization subdomain.
What functions are defined in Example.js?
Example.js defines 1 function(s): Example.
What does Example.js depend on?
Example.js imports 9 module(s): BabelClass, BabelClassWithFields, BabelClasses-compiled.js, Component, Components.js, DisplayName, FrozenClass, NativeClass, and 1 more.
Where is Example.js in the architecture?
Example.js is located at fixtures/stacks/Example.js (domain: BabelCompiler, subdomain: Optimization, directory: fixtures/stacks).

Analyze Your Own Codebase

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

Try Supermodel Free