Skip to content

Commit c315e38

Browse files
authored
Updated imports (#1747)
1 parent e024181 commit c315e38

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/realtime/streams.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ async function subscribeToStream(runId: string) {
166166
If you're building a frontend application, you can use our React hooks to subscribe to streams. Here's an example of how you can use the `useRealtimeRunWithStreams` hook to subscribe to a stream:
167167

168168
```tsx
169-
import { useRealtimeRunWithStreams } from "@trigger.dev/sdk/v3";
169+
import { useRealtimeRunWithStreams } from "@trigger.dev/react-hooks";
170170
import type { myTask, STREAMS } from "./trigger/my-task";
171171

172172
// Somewhere in your React component
@@ -245,7 +245,7 @@ export const aiStreaming = schemaTask({
245245
And then render the stream in your frontend:
246246

247247
```tsx
248-
import { useRealtimeRunWithStreams } from "@trigger.dev/sdk/v3";
248+
import { useRealtimeRunWithStreams } from "@trigger.dev/react-hooks";
249249
import type { aiStreaming, STREAMS } from "./trigger/ai-streaming";
250250

251251
function MyComponent({ runId, publicAccessToken }: { runId: string; publicAccessToken: string }) {
@@ -339,8 +339,7 @@ export const aiStreamingWithTools = schemaTask({
339339
Now you can get access to the tool call and results in your frontend:
340340

341341
```tsx
342-
import { useRealtimeRunWithStreams } from "@trigger.dev/sdk/v3";
343-
import { useRealtimeRunWithStreams } from "@trigger.dev/sdk/v3";
342+
import { useRealtimeRunWithStreams } from "@trigger.dev/react-hooks";
344343
import type { aiStreamingWithTools, STREAMS } from "./trigger/ai-streaming";
345344

346345
function MyComponent({ runId, publicAccessToken }: { runId: string; publicAccessToken: string }) {

0 commit comments

Comments
 (0)