A React error boundary component with integrated Sentry error reporting using Raven JS. This library uses an instance of Raven JS Client to manually capture exceptions in the React lifecycle method componentDidCatch. This is especially useful for implementing Sentry error reporting within integrated content.
npm install --save-dev react-sentry-error-boundary
prop-types >=15.5.0
raven-js >=3.26.3
react >=16.0.0
import MyWidget from './MyWidget'
import SentryErrorBoundary from 'react-sentry-error-boundary'
import React from 'react'
const App = () =>
<SentryErrorBoundary dsn="https://<key>@sentry.io/<project>">
<MyWidget />
</SentryErrorBoundary>
export default App
A Sentry configuration object.
REQUIRED. A Sentry DSN URL.
A callback function to execute on error.
A node to render on error.
A bool indicating whether errors are logged to Sentry. Defaults to true.
A Sentry user context object.