Error Boundary Components
Building an ErrorBoundary wrapper component with fallback slot and error display.
What Is an Error Boundary
An error boundary is a reusable component that wraps part of your UI, catches errors from inside it, and shows a fallback instead of letting the whole app break.
The Core Idea
The boundary keeps a hasError flag. While false it renders its children; once an error is captured it flips to true and renders a fallback.
import { ref } from "vue";
const hasError = ref(false);