a React boundary component that renders a fallback UI when an error occurs.
You can customize the fallback UI by passing a fallback prop to the
ErrorBoundary component.
in Next.Js 16.3 or newer you should use
catchError
Installation
Usage
import ErrorBoundary from "@/components/ui/ErrorBoundary";
<ErrorBoundary> <Component /> </ErrorBoundary>