Home / Class/ Outer Class — react Architecture

Outer Class — react Architecture

Architecture documentation for the Outer class in ReactComponent-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  21d2b2cb_792d_81bf_3455_3c5bfc281829["Outer"]
  fcb11462_6e67_b4af_9dfc_b2e2c1126dd1["ReactComponent-test.js"]
  21d2b2cb_792d_81bf_3455_3c5bfc281829 -->|defined in| fcb11462_6e67_b4af_9dfc_b2e2c1126dd1
  e38ff31d_c199_dfe0_9d9a_bba57e3fe145["render()"]
  21d2b2cb_792d_81bf_3455_3c5bfc281829 -->|method| e38ff31d_c199_dfe0_9d9a_bba57e3fe145
  7208ee5b_985b_63a2_7390_c9b8289f71dc["componentDidMount()"]
  21d2b2cb_792d_81bf_3455_3c5bfc281829 -->|method| 7208ee5b_985b_63a2_7390_c9b8289f71dc
  0374dbbd_325d_3797_d46a_87217c0f4c26["componentDidUpdate()"]
  21d2b2cb_792d_81bf_3455_3c5bfc281829 -->|method| 0374dbbd_325d_3797_d46a_87217c0f4c26
  49f280ad_5132_f604_b3a7_6aa6d4db8732["componentWillUnmount()"]
  21d2b2cb_792d_81bf_3455_3c5bfc281829 -->|method| 49f280ad_5132_f604_b3a7_6aa6d4db8732

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactComponent-test.js lines 313–344

    class Outer extends React.Component {
      render() {
        return (
          <div>
            <Inner
              id={1}
              ref={c => {
                log.push(`ref 1 got ${c ? `instance ${c.props.id}` : 'null'}`);
              }}
            />
            <Inner
              id={2}
              ref={c => {
                log.push(`ref 2 got ${c ? `instance ${c.props.id}` : 'null'}`);
              }}
            />
          </div>
        );
      }

      componentDidMount() {
        log.push('outer componentDidMount');
      }

      componentDidUpdate() {
        log.push('outer componentDidUpdate');
      }

      componentWillUnmount() {
        log.push('outer componentWillUnmount');
      }
    }

Frequently Asked Questions

What is the Outer class?
Outer is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactComponent-test.js.
Where is Outer defined?
Outer is defined in packages/react-dom/src/__tests__/ReactComponent-test.js at line 313.

Analyze Your Own Codebase

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

Try Supermodel Free