Component Class — react Architecture
Architecture documentation for the Component class in ReactComponent-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD a2f2032d_e71d_59b3_e9e5_d0ed0c7bb2e7["Component"] fcb11462_6e67_b4af_9dfc_b2e2c1126dd1["ReactComponent-test.js"] a2f2032d_e71d_59b3_e9e5_d0ed0c7bb2e7 -->|defined in| fcb11462_6e67_b4af_9dfc_b2e2c1126dd1 27f4b8a2_326f_7087_3861_45e45e59ace4["render()"] a2f2032d_e71d_59b3_e9e5_d0ed0c7bb2e7 -->|method| 27f4b8a2_326f_7087_3861_45e45e59ace4 b5f8d5df_161e_6afa_a160_addc538d9772["componentDidMount()"] a2f2032d_e71d_59b3_e9e5_d0ed0c7bb2e7 -->|method| b5f8d5df_161e_6afa_a160_addc538d9772 4a0b2dea_abb5_41f8_eceb_9dd94241830c["constructor()"] a2f2032d_e71d_59b3_e9e5_d0ed0c7bb2e7 -->|method| 4a0b2dea_abb5_41f8_eceb_9dd94241830c
Relationship Graph
Source Code
packages/react-dom/src/__tests__/ReactComponent-test.js lines 166–184
class Component extends React.Component {
render() {
const inner = (
<Wrapper object={innerObj} ref={c => (this.innerRef = c)} />
);
const outer = (
<Wrapper object={outerObj} ref={c => (this.outerRef = c)}>
{inner}
</Wrapper>
);
return outer;
}
componentDidMount() {
expect(this.innerRef.getObject()).toEqual(innerObj);
expect(this.outerRef.getObject()).toEqual(outerObj);
mounted = true;
}
}
Source
Frequently Asked Questions
What is the Component class?
Component is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactComponent-test.js.
Where is Component defined?
Component is defined in packages/react-dom/src/__tests__/ReactComponent-test.js at line 166.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free