Skip to main content

useWebhookStats

The useWebhookStats hook returns aggregate webhook delivery stats for the current webhook app context.

Return Value

stats
WebhookStats | null
Webhook summary metrics.
loading
boolean
Whether stats are loading.
error
unknown
Error from the latest request.
refetch
() => void
Revalidate stats.

Example

import { useWebhookStats } from "@wacht/react-router";

function WebhookOverview() {
  const { stats } = useWebhookStats();
  return <pre>{JSON.stringify(stats, null, 2)}</pre>;
}