Realtime API
useRealtimeRun#
Subscribe to a run by ID.
import { useRealtimeRun } from "@trigger.dev/react-hooks";
const { run, error } = useRealtimeRun(runId, {
accessToken: publicAccessToken,
});Output: the current run state and any error from the subscription.
useRealtimeStream#
Consume a stream emitted by a task. The exact stream definition depends on the data your task emits.
const { stream, error } = useRealtimeStream(streamId, {
accessToken: publicAccessToken,
});Output: stream data arrives as the task produces it.
This preview omits authentication and hook option tables. Use the upstream Realtime reference before shipping an integration.