ErrorBoundaryProps
Props of ErrorBoundary.
Props of ErrorBoundary.
Import#
ts
import type { ErrorBoundaryProps } from "@shadow-js/web";
Signature#
ts
interface ErrorBoundaryProps {
/**
* Shown after an error. A function is called untracked as `(error, reset)`; any other value is
* shown as is.
*/
readonly fallback: JsxChild | ((error: unknown, reset: () => void) => unknown);
/**
* The protected content, read untracked when the children are built.
* @default undefined (nothing is protected; the boundary renders nothing)
*/
readonly children?: JsxChild | (() => unknown);
}
Members#
| Name | Type | Description |
|---|---|---|
fallback |
readonly fallback: JsxChild | ((error: unknown, reset: () => void) => unknown) |
Shown after an error. A function is called untracked as (error, reset); any other value is shown as is. |
children? |
readonly children?: JsxChild | (() => unknown) |
The protected content, read untracked when the children are built. |