ContextProvider Class — react Architecture
Architecture documentation for the ContextProvider class in ReactIncremental-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD fcf0cfb4_843c_c145_64ab_74f2ad54483a["ContextProvider"] e830a60d_4147_3606_7890_6db744e9073f["ReactIncremental-test.js"] fcf0cfb4_843c_c145_64ab_74f2ad54483a -->|defined in| e830a60d_4147_3606_7890_6db744e9073f 7e80e6d1_0cf9_d279_559a_538d0bd09506["constructor()"] fcf0cfb4_843c_c145_64ab_74f2ad54483a -->|method| 7e80e6d1_0cf9_d279_559a_538d0bd09506 56d454ec_ea9d_482e_a797_e4e3e7b810c7["getChildContext()"] fcf0cfb4_843c_c145_64ab_74f2ad54483a -->|method| 56d454ec_ea9d_482e_a797_e4e3e7b810c7 4e5b4613_ef0e_55d5_5b6d_40c6f47d111f["render()"] fcf0cfb4_843c_c145_64ab_74f2ad54483a -->|method| 4e5b4613_ef0e_55d5_5b6d_40c6f47d111f
Relationship Graph
Source Code
packages/react-reconciler/src/__tests__/ReactIncremental-test.js lines 2246–2268
class ContextProvider extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {};
if (props.depth === 1) {
instance = this;
}
}
static childContextTypes = {};
getChildContext() {
return {};
}
render() {
if (this.state.throwError) {
throw Error();
}
return this.props.depth < 4 ? (
<ContextProvider depth={this.props.depth + 1} />
) : (
<div />
);
}
}
Source
Frequently Asked Questions
What is the ContextProvider class?
ContextProvider is a class in the react codebase, defined in packages/react-reconciler/src/__tests__/ReactIncremental-test.js.
Where is ContextProvider defined?
ContextProvider is defined in packages/react-reconciler/src/__tests__/ReactIncremental-test.js at line 2246.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free