LegacyProvider Class — react Architecture
Architecture documentation for the LegacyProvider class in ReactNewContext-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 07b358b4_3bec_70bd_6cf9_48e86f11ea05["LegacyProvider"] 382e7256_eb32_dd1d_b5d7_fa78a7166483["ReactNewContext-test.js"] 07b358b4_3bec_70bd_6cf9_48e86f11ea05 -->|defined in| 382e7256_eb32_dd1d_b5d7_fa78a7166483 843d5c52_65a1_9c02_df6e_3d4baea11c3f["getChildContext()"] 07b358b4_3bec_70bd_6cf9_48e86f11ea05 -->|method| 843d5c52_65a1_9c02_df6e_3d4baea11c3f 45915afe_e454_db5f_f1b5_d546ec41d773["render()"] 07b358b4_3bec_70bd_6cf9_48e86f11ea05 -->|method| 45915afe_e454_db5f_f1b5_d546ec41d773
Relationship Graph
Source Code
packages/react-reconciler/src/__tests__/ReactNewContext-test.js lines 998–1010
class LegacyProvider extends React.Component {
static childContextTypes = {
legacyValue: () => {},
};
state = {legacyValue: 1};
getChildContext() {
return {legacyValue: this.state.legacyValue};
}
render() {
Scheduler.log('LegacyProvider');
return this.props.children;
}
}
Source
Frequently Asked Questions
What is the LegacyProvider class?
LegacyProvider is a class in the react codebase, defined in packages/react-reconciler/src/__tests__/ReactNewContext-test.js.
Where is LegacyProvider defined?
LegacyProvider is defined in packages/react-reconciler/src/__tests__/ReactNewContext-test.js at line 998.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free