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