--- title: "useEventDetails()" description: "The `useEventDetails()` React hook will show the live status of an event that was sent using `sendEvent()`." --- It will automatically update until all triggered runs with the event have completed or failed. ## Parameters The event ID to get the details for. This is returned when calling either [client.sendEvent()](/sdk/triggerclient/instancemethods/sendevent) or [io.sendEvent()](/sdk/io/sendevent). ## Returns The data returned from the server. ```typescript components/EventDetails.tsx "use client"; import { useEventDetails } from "@trigger.dev/react"; export function EventDetails({ eventId }: { eventId: string }) { const { isLoading, isError, data, error } = useEventDetails(eventId); if (isLoading) { return
Loading...
; } if (isError) { return
Error: {error.message}
; } //get the first run (if one has started yet) const firstRun = event.data?.runs?.at(0); //if the run is there, show the status, otherwise loading return
{firstRun ? firstRun.status : "Loading"}
; } ```