value of the parent Context specified
in contextType
.
Static
getUpdates state so the next render shows the fallback UI.
Reports the error to Datadog RUM with boundary name, stack, and app name.
The error thrown by a child component.
React error info (component stack).
Renders the fallback UI if an error was caught, otherwise renders children.
React error boundary that catches errors in its child components and reports them to Datadog RUM.
Remarks
Use this component to wrap any part of your React app where you want to catch and report errors. When an error is caught, the fallback UI is rendered (if provided).
Example
Param: props
children
: The subtree to protect with the error boundary.fallback
: Optional React node to render when an error is caught.name
: Optional identifier for this boundary (included in telemetry).