Parent Class — react Architecture
Architecture documentation for the Parent class in ReactDOMLegacyFiber-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 300552e7_4073_de33_3e5f_424183faf3e3["Parent"] 52a5c246_05df_8a3e_9c6a_9c022bdd6101["ReactDOMLegacyFiber-test.js"] 300552e7_4073_de33_3e5f_424183faf3e3 -->|defined in| 52a5c246_05df_8a3e_9c6a_9c022bdd6101 e0b563dc_6aea_6e9f_feda_d2af14dbec83["componentDidMount()"] 300552e7_4073_de33_3e5f_424183faf3e3 -->|method| e0b563dc_6aea_6e9f_feda_d2af14dbec83 1a6a0cf8_a8a5_cc05_0bbc_954cbcaceec2["componentDidUpdate()"] 300552e7_4073_de33_3e5f_424183faf3e3 -->|method| 1a6a0cf8_a8a5_cc05_0bbc_954cbcaceec2 bbfbb0e1_fddc_ac0a_d69c_08d7c7ed194d["componentWillUnmount()"] 300552e7_4073_de33_3e5f_424183faf3e3 -->|method| bbfbb0e1_fddc_ac0a_d69c_08d7c7ed194d 5e35b31b_c618_5aa0_18b5_d62b4641cca5["render()"] 300552e7_4073_de33_3e5f_424183faf3e3 -->|method| 5e35b31b_c618_5aa0_18b5_d62b4641cca5 44b77ee1_b13f_80ec_537f_51df37b7e7a7["getChildContext()"] 300552e7_4073_de33_3e5f_424183faf3e3 -->|method| 44b77ee1_b13f_80ec_537f_51df37b7e7a7
Relationship Graph
Source Code
packages/react-dom/src/__tests__/ReactDOMLegacyFiber-test.js lines 299–327
class Parent extends React.Component {
componentDidMount() {
ops.push(`Parent:${this.props.step} componentDidMount`);
}
componentDidUpdate() {
ops.push(`Parent:${this.props.step} componentDidUpdate`);
}
componentWillUnmount() {
ops.push(`Parent:${this.props.step} componentWillUnmount`);
}
render() {
const {step} = this.props;
return [
<Child key="a" name={`normal[0]:${step}`} />,
ReactDOM.createPortal(
<Child key="b" name={`portal1[0]:${step}`} />,
portalContainer1,
),
<Child key="c" name={`normal[1]:${step}`} />,
ReactDOM.createPortal(
[
<Child key="d" name={`portal2[0]:${step}`} />,
<Child key="e" name={`portal2[1]:${step}`} />,
],
portalContainer2,
),
];
}
}
Source
Frequently Asked Questions
What is the Parent class?
Parent is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactDOMLegacyFiber-test.js.
Where is Parent defined?
Parent is defined in packages/react-dom/src/__tests__/ReactDOMLegacyFiber-test.js at line 299.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free