--- title: "useRunDetails()" description: "The `useRunDetails()` React hook will show the live status of run." --- This hook will automatically update until the run has either completed or failed. There are a couple of ways you can get a runId to pass in: - In the frontend you can get the runId from the `useEventDetails()` hook. Although if you want the first run triggered by an event, we suggest you use [useEventRunDetails()](/sdk/react/useeventrundetails). - From the backend you can get the latest runs for a Job using the [client.getRuns()](/sdk/triggerclient/instancemethods/getruns) method. This will return an array of runs, including their ids. You can then pass an id to your frontend to display the live status. You can get the full status of a Run from the backend using the [client.getRun()](/sdk/triggerclient/instancemethods/getrun) method. ## Parameters The run ID to get the details for. ## Returns The data returned from the server. ```typescript components/EventDetails.tsx "use client"; import { useEventDetails } from "@trigger.dev/react"; export function EventDetails({ runId }: { runId: string }) { const { isLoading, isError, data, error } = useRunDetails(runId); if (isLoading) { return
Loading...
; } if (isError) { return
Error: {error.message}
; } //show the run status and all the tasks return (

Run status: {data?.status}

{data?.tasks?.map((task) => (
{task.status === "ERRORED" ? "⛔️" : task.status === "COMPLETED" ? "✅" : "⏳"}

{task.displayKey ?? task.name}

))}
); } ```