Home / Function/ constructor() — react Function Reference

constructor() — react Function Reference

Architecture documentation for the constructor() function in ReactComponentLifeCycle-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d0c9fc7d_9d4d_1cdb_f22b_922d3e78f346["constructor()"]
  7525ab1d_f63f_1b70_472a_5ab791a0b627["LifeCycleComponent"]
  d0c9fc7d_9d4d_1cdb_f22b_922d3e78f346 -->|defined in| 7525ab1d_f63f_1b70_472a_5ab791a0b627
  90bcfc17_a4cf_bfa9_ba0e_855789767151["constructor()"]
  90bcfc17_a4cf_bfa9_ba0e_855789767151 -->|calls| d0c9fc7d_9d4d_1cdb_f22b_922d3e78f346
  41fd00d1_abee_a62a_f64e_a793ebae3601["clone()"]
  d0c9fc7d_9d4d_1cdb_f22b_922d3e78f346 -->|calls| 41fd00d1_abee_a62a_f64e_a793ebae3601
  90bcfc17_a4cf_bfa9_ba0e_855789767151["constructor()"]
  d0c9fc7d_9d4d_1cdb_f22b_922d3e78f346 -->|calls| 90bcfc17_a4cf_bfa9_ba0e_855789767151
  style d0c9fc7d_9d4d_1cdb_f22b_922d3e78f346 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js lines 275–286

      constructor(props, context) {
        super(props, context);
        this._testJournal = {};
        const initState = {
          hasWillMountCompleted: false,
          hasDidMountCompleted: false,
          hasRenderCompleted: false,
          hasWillUnmountCompleted: false,
        };
        this._testJournal.returnedFromGetInitialState = clone(initState);
        this.state = initState;
      }

Domain

Subdomains

Called By

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the react codebase, defined in packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js.
Where is constructor() defined?
constructor() is defined in packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js at line 275.
What does constructor() call?
constructor() calls 2 function(s): clone, constructor.
What calls constructor()?
constructor() is called by 1 function(s): constructor.

Analyze Your Own Codebase

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

Try Supermodel Free