(defcomp
  ()
  (div
    (~tw :tokens "space-y-3")
    (button
      :sx-get "https://this-domain-does-not-exist.invalid/api"
      :sx-target "#ref-evt-re-result"
      :sx-swap "innerHTML"
      :sx-on:sx:requestError "document.getElementById('ref-evt-re-status').style.display = 'block'; document.getElementById('ref-evt-re-status').textContent = 'Network error — request never reached a server'"
      (~tw :tokens "px-4 py-2 bg-violet-600 text-white rounded hover:bg-violet-700 transition-colors text-sm")
      "Request invalid domain")
    (div
      :id "ref-evt-re-status"
      (~tw :tokens "p-2 rounded bg-red-50 text-red-600 text-sm")
      :style "display: none"
      "")
    (div
      :id "ref-evt-re-result"
      (~tw :tokens "p-3 rounded bg-stone-100 text-stone-400 text-sm")
      "Click to trigger a network error — sx:requestError fires.")))
