"use client"; import { Button } from "@azmr/ui/button"; import { ErrorBoundary } from "@azmr/ui/error-boundary"; import { useState } from "react"; function Report({ broken }: { broken: boolean }) { if (broken) throw new Error("Report query failed for customer #4123"); return

Sales this month: $12,480.00

; } export default function ErrorBoundaryDemo() { const [broken, setBroken] = useState(false); const [reported, setReported] = useState(0); return (
setReported((n) => n + 1)} // Try again re-renders the children, so fix the cause first. onReset={() => setBroken(false)} fallbackProps={{ titleAs: "h3", title: "The report couldn't load" }} >

Errors reported: {reported}

); }