componentDidCatch is needed?

Hi! I use Sentry with React.

Should I capture errors in componentDidCatch? If I call Sentry.captureEvent in componentDidCatch manually, I get two new issue instead of one.

It’s caused by React bubbling up all the errors from ErrorBoundary to the main onError handler in DEV mode, it should only report once in Prod mode

1 Like