browser-sdk

Home > @datadog/browser-rum-react > ErrorBoundary

ErrorBoundary class

Error Boundary component used to capture runtime errors in the React tree below and report them to Datadog RUM. It renders the fallback component when an error is caught.

React.Component

Signature:

export declare class ErrorBoundary extends React.Component<Props, State> 

Extends: React.Component<Props, State>

Constructors

Constructor Modifiers Description
(constructor)(props) Constructs a new instance of the `ErrorBoundary` class

Properties

Property Modifiers Type Description
resetError () => void

Methods

Method Modifiers Description
componentDidCatch(error, errorInfo)
getDerivedStateFromError(error) `static`
render()