Get live updates from runs, batches, metadata, and more in your frontend application.
useRealtimeTaskTrigger
- Trigger a task and subscribe to the runuseRealtimeTaskTriggerWithStreams
- Trigger a task and subscribe to both run updates and streamsuseRealtimeRun
hook allows you to subscribe to a run by its ID.
useRealtimeRun
hook:
onComplete
callback to the useRealtimeRun
hook to be called when the run is completed or errored. This is useful if you want to perform some action when the run is completed, like navigating to a different page or showing a notification.
useRealtimeRunsWithTag
hook allows you to subscribe to multiple runs with a specific tag.
useRealtimeRunsWithTag
hook:
useRealtimeRunsWithTag
could return multiple different types of tasks, you can pass a union of all the task types to the hook:
useRealtimeBatch
hook allows you to subscribe to a batch of runs by its the batch ID.
metadata.set()
, metadata.append()
, or other metadata methods, your component will re-render with the updated data.
accessToken
option to the Realtime hooks to authenticate the subscription.
enabled
option to the Realtime hooks to enable or disable the subscription.
id
option to the Realtime hooks to change the ID of the subscription.