Components
ErrorBoundary
Generic error boundary that prevents a crashing subtree from taking down the
rest of the page. Reporting is delegated to onError (no hardcoded logging),
and recovery is available through reset on a render-prop fallback.
Usage
Best practices
ErrorBoundarycatches render crashes in a subtree - pair it with anErrorStateinfallbackto show the failure; it renders nothing by default.It logs nothing itself - wire telemetry through
onError, and offer recovery via the render-propfallback'sresetcallback.
Props
Also exports
- interface
ErrorBoundaryFallbackProps - interface
ErrorBoundaryProps