componentDidCatch method

void componentDidCatch(
  1. dynamic error,
  2. ReactErrorInfo info
)
inherited

ReactJS lifecycle method that is invoked after an error is thrown by a descendant.

Use this method primarily for logging errors, but because it takes place after the commit phase side-effects are permitted.

Note: This method, along with getDerivedStateFromError will only be called if skipMethods in registerComponent2 is overridden with a list that includes the names of these methods. Otherwise, in order to prevent every component from being an "error boundary", componentDidCatch and getDerivedStateFromError will be ignored.

See: reactjs.org/docs/react-component.html#componentdidcatch

Implementation

void componentDidCatch(dynamic error, ReactErrorInfo info) {}