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

Method componentDidCatch

packages/react-client/src/__tests__/ReactFlight-test.js:143–150  ·  view source on GitHub ↗
(error, errorInfo)

Source from the content-addressed store, hash-verified

141 };
142 }
143 componentDidCatch(error, errorInfo) {
144 expect(error).toBe(this.state.error);
145 if (this.props.expectedStack !== undefined) {
146 expect(normalizeCodeLocInfo(errorInfo.componentStack)).toBe(
147 this.props.expectedStack,
148 );
149 }
150 }
151 componentDidMount() {
152 expect(this.state.hasError).toBe(true);
153 expect(this.state.error).toBeTruthy();

Callers

nothing calls this directly

Calls 2

normalizeCodeLocInfoFunction · 0.70
toBeMethod · 0.65

Tested by

no test coverage detected