Outer Class — react Architecture
Architecture documentation for the Outer class in ReactUpdates-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 1d72d063_ac52_8aad_998a_3e56102a66ce["Outer"] e1a7562e_ea2b_594b_d7d2_0ca836dcd888["ReactUpdates-test.js"] 1d72d063_ac52_8aad_998a_3e56102a66ce -->|defined in| e1a7562e_ea2b_594b_d7d2_0ca836dcd888 2ff105fd_b1de_2749_cf10_fa314d8af113["constructor()"] 1d72d063_ac52_8aad_998a_3e56102a66ce -->|method| 2ff105fd_b1de_2749_cf10_fa314d8af113 530f0fc5_ff55_55ed_4861_3898dd687ba6["render()"] 1d72d063_ac52_8aad_998a_3e56102a66ce -->|method| 530f0fc5_ff55_55ed_4861_3898dd687ba6 a05bc2b3_a5a3_102a_4db2_fb8170dbfd15["componentDidUpdate()"] 1d72d063_ac52_8aad_998a_3e56102a66ce -->|method| a05bc2b3_a5a3_102a_4db2_fb8170dbfd15
Relationship Graph
Source Code
packages/react-dom/src/__tests__/ReactUpdates-test.js lines 723–747
class Outer extends React.Component {
state = {x: 0};
innerRef = React.createRef();
constructor(props) {
super(props);
instance = this;
}
render() {
updates.push('Outer-render-' + this.state.x);
return (
<div>
<Inner x={this.state.x} ref={this.innerRef} />
</div>
);
}
componentDidUpdate() {
const x = this.state.x;
updates.push('Outer-didUpdate-' + x);
updates.push('Inner-setState-' + x);
this.innerRef.current.setState({x: x}, function () {
updates.push('Inner-callback-' + x);
});
}
}
Source
Frequently Asked Questions
What is the Outer class?
Outer is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactUpdates-test.js.
Where is Outer defined?
Outer is defined in packages/react-dom/src/__tests__/ReactUpdates-test.js at line 723.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free