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

Function ErrorOnUnmount

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

Source from the content-addressed store, hash-verified

69
70// $FlowFixMe[missing-local-annot]
71function ErrorOnUnmount({children = null}) {
72 useEffect(() => {
73 return () => {
74 console.error('This error fires on unmount');
75 };
76 }, []);
77 return children;
78}
79
80// $FlowFixMe[missing-local-annot]
81function ErrorAndWarningDuringRender({children = null}) {

Callers

nothing calls this directly

Calls 2

useEffectFunction · 0.90
errorMethod · 0.65

Tested by

no test coverage detected