MCPcopy
hub / github.com/facebook/react / WarnOnMount

Function WarnOnMount

packages/react-devtools-shell/src/app/InlineWarnings/index.js:13–18  ·  view source on GitHub ↗
({children = null})

Source from the content-addressed store, hash-verified

11
12// $FlowFixMe[missing-local-annot]
13function WarnOnMount({children = null}) {
14 useEffect(() => {
15 console.warn('This warning fires on initial mount only');
16 }, []);
17 return children;
18}
19
20// $FlowFixMe[missing-local-annot]
21function WarnOnUpdate({children = null}) {

Callers

nothing calls this directly

Calls 1

useEffectFunction · 0.90

Tested by

no test coverage detected