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

Function WarnOnUnmount

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

Source from the content-addressed store, hash-verified

32
33// $FlowFixMe[missing-local-annot]
34function WarnOnUnmount({children = null}) {
35 useEffect(() => {
36 return () => {
37 console.warn('This warning fires on unmount');
38 };
39 }, []);
40 return children;
41}
42
43// $FlowFixMe[missing-local-annot]
44function ErrorDuringRender({children = null}) {

Callers

nothing calls this directly

Calls 1

useEffectFunction · 0.90

Tested by

no test coverage detected