Documentation Index
Fetch the complete documentation index at: https://kubo-47e69177.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
ActionErrorBoundary
API
packages/react/src/ActionErrorBoundary.tsx
export class ActionErrorBoundary extends Component<ActionErrorBoundaryProps, State> {}
export function useActionErrorReset(): {
error: unknown;
reset: () => void;
}
Usage basique
"use client";
import { ActionErrorBoundary } from "@zapaction/react";
<ActionErrorBoundary fallback={<p>Une erreur est survenue</p>}>
<TodoPanel />
</ActionErrorBoundary>;
Usage avec fallback fonctionnel
components/error-fallback.tsx
import { ActionErrorBoundary } from "@zapaction/react";
<ActionErrorBoundary
fallback={({ error, reset }) => (
<div>
<p>Echec: {String(error)}</p>
<button onClick={reset}>Reessayer</button>
</div>
)}
>
<TodoPanel />
</ActionErrorBoundary>;