LegacyContextProvider Class — react Architecture
Architecture documentation for the LegacyContextProvider class in editing-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 67c5408e_5ede_12ad_81b9_c05dd292f77d["LegacyContextProvider"] bd74aa33_85ac_3db3_8a83_21cf5643c02f["editing-test.js"] 67c5408e_5ede_12ad_81b9_c05dd292f77d -->|defined in| bd74aa33_85ac_3db3_8a83_21cf5643c02f
Relationship Graph
Source Code
packages/react-devtools-shared/src/__tests__/editing-test.js lines 890–918
class LegacyContextProvider extends React.Component<any> {
static childContextTypes = {
array: PropTypes.array,
object: PropTypes.object,
shallow: PropTypes.string,
};
getChildContext() {
return {
array: [1, 2, 3],
object: {
nested: 'initial',
},
shallow: 'initial',
};
}
render() {
return this.props.children;
}
}
class ClassComponent extends React.Component<any> {
static contextTypes = {
array: PropTypes.array,
object: PropTypes.object,
shallow: PropTypes.string,
};
componentDidMount() {
committedContext = this.context;
}
Domain
Source
Frequently Asked Questions
What is the LegacyContextProvider class?
LegacyContextProvider is a class in the react codebase, defined in packages/react-devtools-shared/src/__tests__/editing-test.js.
Where is LegacyContextProvider defined?
LegacyContextProvider is defined in packages/react-devtools-shared/src/__tests__/editing-test.js at line 890.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free