ErrorAndWarningOnUpdate() — react Function Reference
Architecture documentation for the ErrorAndWarningOnUpdate() function in index.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 6dddc510_3f36_b5b7_fa13_fec2b1dc2683["ErrorAndWarningOnUpdate()"] a0507bb6_7cf5_071e_db51_f9f50de2969a["index.js"] 6dddc510_3f36_b5b7_fa13_fec2b1dc2683 -->|defined in| a0507bb6_7cf5_071e_db51_f9f50de2969a style 6dddc510_3f36_b5b7_fa13_fec2b1dc2683 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-shell/src/app/InlineWarnings/index.js lines 97–108
function ErrorAndWarningOnUpdate({children = null}) {
const didMountRef = useRef(false);
useEffect(() => {
if (didMountRef.current) {
console.warn('This warning fires on every update');
console.error('This error fires on every update');
} else {
didMountRef.current = true;
}
});
return children;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does ErrorAndWarningOnUpdate() do?
ErrorAndWarningOnUpdate() is a function in the react codebase, defined in packages/react-devtools-shell/src/app/InlineWarnings/index.js.
Where is ErrorAndWarningOnUpdate() defined?
ErrorAndWarningOnUpdate() is defined in packages/react-devtools-shell/src/app/InlineWarnings/index.js at line 97.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free