Home / Class/ TestComponent Class — react Architecture

TestComponent Class — react Architecture

Architecture documentation for the TestComponent class in ReactServerRendering-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  8627b298_2711_4670_d1c8_e9e2c2f26917["TestComponent"]
  ecd5c796_fb70_761c_4369_6fab3fb70e91["ReactServerRendering-test.js"]
  8627b298_2711_4670_d1c8_e9e2c2f26917 -->|defined in| ecd5c796_fb70_761c_4369_6fab3fb70e91
  db73aaf1_c4b5_3d1d_2fab_f8ac9e1ae6d6["constructor()"]
  8627b298_2711_4670_d1c8_e9e2c2f26917 -->|method| db73aaf1_c4b5_3d1d_2fab_f8ac9e1ae6d6
  cb6e55af_ed04_85a7_0e2a_f0b0d467d6da["UNSAFE_componentWillMount()"]
  8627b298_2711_4670_d1c8_e9e2c2f26917 -->|method| cb6e55af_ed04_85a7_0e2a_f0b0d467d6da
  3364c91d_d5bf_b6ec_9f07_66c5e0c72408["componentDidMount()"]
  8627b298_2711_4670_d1c8_e9e2c2f26917 -->|method| 3364c91d_d5bf_b6ec_9f07_66c5e0c72408
  2ecbdac6_23a0_0786_6338_3dcee02f5565["render()"]
  8627b298_2711_4670_d1c8_e9e2c2f26917 -->|method| 2ecbdac6_23a0_0786_6338_3dcee02f5565
  06f754d4_87ab_12ce_6c7a_79c80b48c35d["UNSAFE_componentWillUpdate()"]
  8627b298_2711_4670_d1c8_e9e2c2f26917 -->|method| 06f754d4_87ab_12ce_6c7a_79c80b48c35d
  b4195072_9c29_7b5f_88f5_dc69217408d0["componentDidUpdate()"]
  8627b298_2711_4670_d1c8_e9e2c2f26917 -->|method| b4195072_9c29_7b5f_88f5_dc69217408d0
  ea35df4f_472e_db27_d2f6_c6fb2fa2d3eb["shouldComponentUpdate()"]
  8627b298_2711_4670_d1c8_e9e2c2f26917 -->|method| ea35df4f_472e_db27_d2f6_c6fb2fa2d3eb
  2636a66e_8d15_5560_01de_18558dc9ab7c["UNSAFE_componentWillReceiveProps()"]
  8627b298_2711_4670_d1c8_e9e2c2f26917 -->|method| 2636a66e_8d15_5560_01de_18558dc9ab7c
  51e9702a_2e2a_2977_de16_0a659b9fb71a["componentWillUnmount()"]
  8627b298_2711_4670_d1c8_e9e2c2f26917 -->|method| 51e9702a_2e2a_2977_de16_0a659b9fb71a

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactServerRendering-test.js lines 89–128

        class TestComponent extends React.Component {
          constructor(props) {
            super(props);
            lifecycle.push('getInitialState');
            this.state = {name: 'TestComponent'};
          }

          UNSAFE_componentWillMount() {
            lifecycle.push('componentWillMount');
          }

          componentDidMount() {
            lifecycle.push('componentDidMount');
          }

          render() {
            lifecycle.push('render');
            return <span>Component name: {this.state.name}</span>;
          }

          UNSAFE_componentWillUpdate() {
            lifecycle.push('componentWillUpdate');
          }

          componentDidUpdate() {
            lifecycle.push('componentDidUpdate');
          }

          shouldComponentUpdate() {
            lifecycle.push('shouldComponentUpdate');
          }

          UNSAFE_componentWillReceiveProps() {
            lifecycle.push('componentWillReceiveProps');
          }

          componentWillUnmount() {
            lifecycle.push('componentWillUnmount');
          }
        }

Frequently Asked Questions

What is the TestComponent class?
TestComponent is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactServerRendering-test.js.
Where is TestComponent defined?
TestComponent is defined in packages/react-dom/src/__tests__/ReactServerRendering-test.js at line 89.

Analyze Your Own Codebase

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

Try Supermodel Free