Spy Class — react Architecture
Architecture documentation for the Spy class in ReactMultiChild-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD e2df3d7c_751c_e001_7b0e_eb8ac8eb9143["Spy"] 8096a712_ad49_064d_6d4f_eb74bbe9d22a["ReactMultiChild-test.js"] e2df3d7c_751c_e001_7b0e_eb8ac8eb9143 -->|defined in| 8096a712_ad49_064d_6d4f_eb74bbe9d22a 8a554509_3b44_88c4_d713_e8965c8760af["UNSAFE_componentWillMount()"] e2df3d7c_751c_e001_7b0e_eb8ac8eb9143 -->|method| 8a554509_3b44_88c4_d713_e8965c8760af ae2c02b1_91a4_88ba_6dee_68d3351815d8["render()"] e2df3d7c_751c_e001_7b0e_eb8ac8eb9143 -->|method| ae2c02b1_91a4_88ba_6dee_68d3351815d8 f67234d5_1f23_ff63_9b7b_7fe60bb6190c["componentDidMount()"] e2df3d7c_751c_e001_7b0e_eb8ac8eb9143 -->|method| f67234d5_1f23_ff63_9b7b_7fe60bb6190c 46bfa3e0_d187_0c10_9df7_4949b4c111b1["componentWillUnmount()"] e2df3d7c_751c_e001_7b0e_eb8ac8eb9143 -->|method| 46bfa3e0_d187_0c10_9df7_4949b4c111b1
Relationship Graph
Source Code
packages/react-dom/src/__tests__/ReactMultiChild-test.js lines 508–522
class Spy extends React.Component {
UNSAFE_componentWillMount() {
log.push(this.props.name + ' componentWillMount');
}
render() {
log.push(this.props.name + ' render');
return <div />;
}
componentDidMount() {
log.push(this.props.name + ' componentDidMount');
}
componentWillUnmount() {
log.push(this.props.name + ' componentWillUnmount');
}
}
Source
Frequently Asked Questions
What is the Spy class?
Spy is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactMultiChild-test.js.
Where is Spy defined?
Spy is defined in packages/react-dom/src/__tests__/ReactMultiChild-test.js at line 508.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free