(defcomp
  ()
  (~docs/page
    :title "Error Boundaries"
    (p
      "When an island's rendering or effect throws, "
      (code "error-boundary")
      " catches the error and renders a fallback. The fallback receives the error and a retry function. Partial effects created before the error are disposed automatically.")
    (~reactive-islands/index/demo-error-boundary)
    (~docs/code
      :src (highlight
        (component-source "~reactive-islands/index/demo-error-boundary")
        "lisp"))
    (p
      "React equivalent: "
      (code "componentDidCatch")
      " / "
      (code "ErrorBoundary")
      ". SX's version is simpler — one form, not a class. The "
      (code "error-boundary")
      " form is a render-dom special form in "
      (code "adapter-dom.sx")
      ".")))
