SwitcherParent Class — react Architecture
Architecture documentation for the SwitcherParent class in ReactComponentLifeCycle-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD d50db234_90bf_36c3_b78e_b18e75185d30["SwitcherParent"] a5334318_ba5d_d1e3_5be5_45cbc1076fcf["ReactComponentLifeCycle-test.js"] d50db234_90bf_36c3_b78e_b18e75185d30 -->|defined in| a5334318_ba5d_d1e3_5be5_45cbc1076fcf 3bfce029_109a_7072_0da4_25016c76b393["constructor()"] d50db234_90bf_36c3_b78e_b18e75185d30 -->|method| 3bfce029_109a_7072_0da4_25016c76b393 558480cb_809a_3f3c_9668_b3607bbbb05c["componentDidMount()"] d50db234_90bf_36c3_b78e_b18e75185d30 -->|method| 558480cb_809a_3f3c_9668_b3607bbbb05c e08ad6b7_f7b9_a8d2_28eb_c5294f6c3420["render()"] d50db234_90bf_36c3_b78e_b18e75185d30 -->|method| e08ad6b7_f7b9_a8d2_28eb_c5294f6c3420
Relationship Graph
Source Code
packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js lines 133–156
class SwitcherParent extends React.Component {
constructor(props) {
super(props);
_testJournal.push('SwitcherParent:getInitialState');
this.state = {showHasOnDOMReadyComponent: false};
}
componentDidMount() {
_testJournal.push('SwitcherParent:onDOMReady');
this.switchIt();
}
switchIt = () => {
this.setState({showHasOnDOMReadyComponent: true});
};
render() {
return (
<div>
{this.state.showHasOnDOMReadyComponent ? <Child /> : <div />}
</div>
);
}
}
Source
Frequently Asked Questions
What is the SwitcherParent class?
SwitcherParent is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js.
Where is SwitcherParent defined?
SwitcherParent is defined in packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js at line 133.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free