Home / Class/ Test Class — react Architecture

Test Class — react Architecture

Architecture documentation for the Test class in ReactCompositeComponentState-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  6a41ba62_6b34_6d3b_c13f_94f3b31fbc8c["Test"]
  429c3b55_419d_c3df_5cf5_409b23a8a2a6["ReactCompositeComponentState-test.js"]
  6a41ba62_6b34_6d3b_c13f_94f3b31fbc8c -->|defined in| 429c3b55_419d_c3df_5cf5_409b23a8a2a6
  f2ceeeec_2d6f_16f2_d194_f52a4666df69["componentDidMount()"]
  6a41ba62_6b34_6d3b_c13f_94f3b31fbc8c -->|method| f2ceeeec_2d6f_16f2_d194_f52a4666df69
  40da9b1e_8c3d_8c45_0f3b_e6f543c2ffe3["render()"]
  6a41ba62_6b34_6d3b_c13f_94f3b31fbc8c -->|method| 40da9b1e_8c3d_8c45_0f3b_e6f543c2ffe3
  0b85f71d_2ab6_3025_441b_7d0932bc1867["shouldComponentUpdate()"]
  6a41ba62_6b34_6d3b_c13f_94f3b31fbc8c -->|method| 0b85f71d_2ab6_3025_441b_7d0932bc1867
  9091a319_7a88_7361_5d53_4e5da6a4ee34["UNSAFE_componentWillReceiveProps()"]
  6a41ba62_6b34_6d3b_c13f_94f3b31fbc8c -->|method| 9091a319_7a88_7361_5d53_4e5da6a4ee34
  d6337c99_334a_c412_d358_040ed18018f1["UNSAFE_componentWillMount()"]
  6a41ba62_6b34_6d3b_c13f_94f3b31fbc8c -->|method| d6337c99_334a_c412_d358_040ed18018f1

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactCompositeComponentState-test.js lines 408–426

    class Test extends React.Component {
      state = {a: 0};
      componentDidMount() {
        test = this;
      }

      render() {
        return null;
      }
      shouldComponentUpdate(nextProps, nextState) {
        Scheduler.log(
          'scu from ' +
            Object.keys(this.state) +
            ' to ' +
            Object.keys(nextState),
        );
        return false;
      }
    }

Frequently Asked Questions

What is the Test class?
Test is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactCompositeComponentState-test.js.
Where is Test defined?
Test is defined in packages/react-dom/src/__tests__/ReactCompositeComponentState-test.js at line 408.

Analyze Your Own Codebase

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

Try Supermodel Free