Salta ai contenuti

ErrorBoundary

Questi contenuti non sono ancora disponibili nella tua lingua.

import { ErrorBoundary } from "@rebasepro/ui";
Prop Type Required Description
fullPage boolean When true, renders a full-page centered error screen instead of the compact inline error. Intended for wrapping top-leve
onReset () => void Optional callback invoked when the user clicks “Try again”. If provided, the boundary resets its error state and calls t

This is the example the design-system sync renders and verifies for this component.

import { ErrorBoundary, Typography } from "@rebasepro/ui";
export const HealthyChild = () => (
<div className="p-4 w-80 border border-surface-200 dark:border-surface-700 rounded-lg">
<ErrorBoundary>
<Typography variant="body2">Dashboard content renders normally — the boundary is invisible until a child throws.</Typography>
</ErrorBoundary>
</div>
);