loadModules() — react Function Reference
Architecture documentation for the loadModules() function in ReactProfiler-test.internal.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 3273e60f_d5f7_3a88_571a_9cfdd6d9d4ba["loadModules()"] da651484_5f55_0111_b32f_8124f5c087a3["ReactProfiler-test.internal.js"] 3273e60f_d5f7_3a88_571a_9cfdd6d9d4ba -->|defined in| da651484_5f55_0111_b32f_8124f5c087a3 d6309c77_9e91_c56d_4c32_caa60e417bd0["shouldComponentUpdate()"] 3273e60f_d5f7_3a88_571a_9cfdd6d9d4ba -->|calls| d6309c77_9e91_c56d_4c32_caa60e417bd0 style 3273e60f_d5f7_3a88_571a_9cfdd6d9d4ba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react/src/__tests__/ReactProfiler-test.internal.js lines 24–60
function loadModules({
enableProfilerTimer = true,
enableProfilerCommitHooks = true,
enableProfilerNestedUpdatePhase = true,
} = {}) {
ReactFeatureFlags = require('shared/ReactFeatureFlags');
ReactFeatureFlags.enableProfilerTimer = enableProfilerTimer;
ReactFeatureFlags.enableProfilerCommitHooks = enableProfilerCommitHooks;
ReactFeatureFlags.enableProfilerNestedUpdatePhase =
enableProfilerNestedUpdatePhase;
React = require('react');
Scheduler = require('scheduler');
ReactNoop = require('react-noop-renderer');
const InternalTestUtils = require('internal-test-utils');
act = InternalTestUtils.act;
assertLog = InternalTestUtils.assertLog;
waitFor = InternalTestUtils.waitFor;
waitForAll = InternalTestUtils.waitForAll;
waitForThrow = InternalTestUtils.waitForThrow;
AdvanceTime = class extends React.Component {
static defaultProps = {
byAmount: 10,
shouldComponentUpdate: true,
};
shouldComponentUpdate(nextProps) {
return nextProps.shouldComponentUpdate;
}
render() {
// Simulate time passing when this component is rendered
Scheduler.unstable_advanceTime(this.props.byAmount);
return this.props.children || null;
}
};
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does loadModules() do?
loadModules() is a function in the react codebase, defined in packages/react/src/__tests__/ReactProfiler-test.internal.js.
Where is loadModules() defined?
loadModules() is defined in packages/react/src/__tests__/ReactProfiler-test.internal.js at line 24.
What does loadModules() call?
loadModules() calls 1 function(s): shouldComponentUpdate.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free