ChildWithoutContext Class — react Architecture
Architecture documentation for the ChildWithoutContext class in ReactLegacyCompositeComponent-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD c44db6ab_f085_09eb_dff4_08344ddce51b["ChildWithoutContext"] 3b351a1f_faad_fff4_44c6_33b8718b45d0["ReactLegacyCompositeComponent-test.js"] c44db6ab_f085_09eb_dff4_08344ddce51b -->|defined in| 3b351a1f_faad_fff4_44c6_33b8718b45d0 2c6d1300_cc6c_7898_43c3_97e005c7cf2f["UNSAFE_componentWillReceiveProps()"] c44db6ab_f085_09eb_dff4_08344ddce51b -->|method| 2c6d1300_cc6c_7898_43c3_97e005c7cf2f d1f38bb6_84c6_c63a_b076_a6e9137bfd7d["render()"] c44db6ab_f085_09eb_dff4_08344ddce51b -->|method| d1f38bb6_84c6_c63a_b076_a6e9137bfd7d
Relationship Graph
Source Code
packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js lines 560–576
class ChildWithoutContext extends React.Component {
UNSAFE_componentWillReceiveProps(nextProps, nextContext) {
expect('foo' in nextContext).toBe(false);
if (nextProps !== this.props) {
propChanges++;
}
if (nextContext !== this.context) {
contextChanges++;
}
}
render() {
return <div className="child-without">{this.props.children}</div>;
}
}
Source
Frequently Asked Questions
What is the ChildWithoutContext class?
ChildWithoutContext is a class in the react codebase, defined in packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js.
Where is ChildWithoutContext defined?
ChildWithoutContext is defined in packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js at line 560.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free