Home / Function/ clone() — react Function Reference

clone() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  41fd00d1_abee_a62a_f64e_a793ebae3601["clone()"]
  a5334318_ba5d_d1e3_5be5_45cbc1076fcf["ReactComponentLifeCycle-test.js"]
  41fd00d1_abee_a62a_f64e_a793ebae3601 -->|defined in| a5334318_ba5d_d1e3_5be5_45cbc1076fcf
  d0c9fc7d_9d4d_1cdb_f22b_922d3e78f346["constructor()"]
  d0c9fc7d_9d4d_1cdb_f22b_922d3e78f346 -->|calls| 41fd00d1_abee_a62a_f64e_a793ebae3601
  78c4cfa6_5e8d_bdbc_f0d8_06fb87df4e80["UNSAFE_componentWillMount()"]
  78c4cfa6_5e8d_bdbc_f0d8_06fb87df4e80 -->|calls| 41fd00d1_abee_a62a_f64e_a793ebae3601
  eb288bf2_8ea9_0429_3935_340cf6ef04c9["componentDidMount()"]
  eb288bf2_8ea9_0429_3935_340cf6ef04c9 -->|calls| 41fd00d1_abee_a62a_f64e_a793ebae3601
  43df8f94_7b9e_7101_f1b9_8a66626f5a2f["render()"]
  43df8f94_7b9e_7101_f1b9_8a66626f5a2f -->|calls| 41fd00d1_abee_a62a_f64e_a793ebae3601
  a41d53af_d96d_c003_c426_717520e34c8a["componentWillUnmount()"]
  a41d53af_d96d_c003_c426_717520e34c8a -->|calls| 41fd00d1_abee_a62a_f64e_a793ebae3601
  style 41fd00d1_abee_a62a_f64e_a793ebae3601 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js lines 19–21

const clone = function (o) {
  return JSON.parse(JSON.stringify(o));
};

Domain

Subdomains

Frequently Asked Questions

What does clone() do?
clone() is a function in the react codebase, defined in packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js.
Where is clone() defined?
clone() is defined in packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js at line 19.
What calls clone()?
clone() is called by 5 function(s): UNSAFE_componentWillMount, componentDidMount, componentWillUnmount, constructor, render.

Analyze Your Own Codebase

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

Try Supermodel Free