π File detail
components/SentryErrorBoundary.ts
π§© .tsπ 29 linesπΎ 487 bytesπ text
β Back to All Filesπ― Use case
This file lives under βcomponents/β, which covers shared React UI pieces. On the API surface it exposes SentryErrorBoundary β mainly types, interfaces, or factory objects. Dependencies touch React UI.
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
import * as React from 'react' interface Props { children: React.ReactNode }
π€ Exports (heuristic)
SentryErrorBoundary
π External import roots
Package roots from from "β¦" (relative paths omitted).
react
π₯οΈ Source preview
import * as React from 'react'
interface Props {
children: React.ReactNode
}
interface State {
hasError: boolean
}
export class SentryErrorBoundary extends React.Component<Props, State> {
constructor(props: Props) {
super(props)
this.state = { hasError: false }
}
static getDerivedStateFromError(): State {
return { hasError: true }
}
render(): React.ReactNode {
if (this.state.hasError) {
return null
}
return this.props.children
}
}