MCPcopy Index your code
hub / github.com/react/react / ErrorOnMount

Function ErrorOnMount

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

Source from the content-addressed store, hash-verified

48
49// $FlowFixMe[missing-local-annot]
50function ErrorOnMount({children = null}) {
51 useEffect(() => {
52 console.error('This error fires on initial mount only');
53 }, []);
54 return children;
55}
56
57// $FlowFixMe[missing-local-annot]
58function ErrorOnUpdate({children = null}) {

Callers

nothing calls this directly

Calls 2

useEffectFunction · 0.90
errorMethod · 0.65

Tested by

no test coverage detected