ErrorBoundary

A React error boundary that catches JavaScript errors in its child component tree and displays a fallback UI instead of crashing the entire application.

Default Fallback

When no custom fallback is provided, the ErrorBoundary renders its built-in error UI.

This component is working normally. Click the button to trigger an error.

Custom Fallback

Pass a custom fallback prop to display your own error UI.

This component is working normally. Click the button to trigger an error.