Fetch and cache data using SWR-based hooks
useRun
hook allows you to fetch a run by its ID.
run
object returned is the same as the run object returned by the Trigger.dev API. To correctly type the run’s payload and output, you can provide the type of your task to the useRun
hook: