Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sebastianmoderski/react-sentry-error-boundary
A React error boundary component with integrated Sentry error reporting using Raven JS.
https://github.com/sebastianmoderski/react-sentry-error-boundary
Last synced: 4 months ago
JSON representation
A React error boundary component with integrated Sentry error reporting using Raven JS.
- Host: GitHub
- URL: https://github.com/sebastianmoderski/react-sentry-error-boundary
- Owner: sebastianmoderski
- License: mit
- Created: 2018-07-01T04:24:31.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2022-12-07T10:51:07.000Z (about 2 years ago)
- Last Synced: 2024-06-30T18:01:12.019Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 311 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# react-sentry-error-boundary
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.### Installation
```
npm install --save-dev react-sentry-error-boundary
```### Requirements
#### Peer Dependencies
```
prop-types >=15.5.0
raven-js >=3.26.3
react >=16.0.0
```### Usage
```js
import MyWidget from './MyWidget'
import SentryErrorBoundary from 'react-sentry-error-boundary'
import React from 'react'const App = () =>
export default App
```### Props
#### config
[Documentation](https://docs.sentry.io/clients/node/config/)
```
A Sentry configuration object.
```#### dsn
[Documentation](https://docs.sentry.io/quickstart/#configure-the-dsn)
```
REQUIRED. A Sentry DSN URL.
```#### errorCallback
```
A callback function to execute on error.
```#### errorNode
```
A node to render on error.
```#### logErrors
```
A bool indicating whether errors are logged to Sentry. Defaults to true.
```#### userContext
[Documentation](https://docs.sentry.io/learn/context/)
```
A Sentry user context object.
```