Skip to content

Commit 663613e

Browse files
committed
Removed examples footers
1 parent 8a89eef commit 663613e

File tree

4 files changed

+17
-20
lines changed

4 files changed

+17
-20
lines changed

docs/realtime/backend/metadata.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ This makes metadata perfect for:
2727

2828
## Updating metadata from tasks
2929

30-
Use the metadata API within your task to update metadata in real-time:
30+
Use the metadata API within your task to update metadata in real-time. In this basic example task, we're updating the progress of a task as it processes items:
31+
32+
### Example task
3133

3234
```ts
3335
import { task, metadata } from "@trigger.dev/sdk/v3";
@@ -61,9 +63,9 @@ async function processItem(item: string) {
6163
}
6264
```
6365

64-
## Subscribing to metadata updates
66+
### Subscribing to metadata updates
6567

66-
Subscribe to runs and receive real-time metadata updates:
68+
We can now subscribe to the runs and receive real-time metadata updates.
6769

6870
```ts
6971
import { runs } from "@trigger.dev/sdk/v3";
@@ -93,6 +95,8 @@ async function monitorProgress(runId: string) {
9395
}
9496
```
9597

98+
For more information on how to write tasks that use the metadata API, see our [run metadata docs](/runs/metadata).
99+
96100
## Common metadata patterns
97101

98102
### Progress tracking

docs/realtime/react-hooks/streams.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ sidebarTitle: Streams
44
description: Subscribe to real-time streams from your tasks in React components
55
---
66

7-
import RealtimeExamplesCards from "/snippets/realtime-examples-cards.mdx";
8-
97
These hooks allow you to consume real-time streams from your tasks. Streams are useful for displaying AI/LLM outputs as they're generated, or any other real-time data from your tasks.
108

119
<Note>
@@ -221,5 +219,3 @@ export function MyComponent({
221219
```
222220

223221
All other options (accessToken, baseURL, enabled, id) work the same as the other realtime hooks. See our [realtime hooks documentation](/realtime/react-hooks/realtime#common-options) for more details.
224-
225-
<RealtimeExamplesCards />{" "}

docs/realtime/react-hooks/subscribe.mdx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ sidebarTitle: Subscribe
44
description: Get live updates from runs, batches, metadata, and more in your frontend application.
55
---
66

7-
import RealtimeExamplesCards from "/snippets/realtime-examples-cards.mdx";
8-
9-
These hooks allow you to subscribe to runs, batches, and streams using [Trigger.dev realtime](/realtime). They automatically include real-time updates for run status, metadata, output, and other properties. Before reading this guide:
10-
11-
- Read our [Realtime documentation](/realtime) to understand how the Trigger.dev realtime API works.
12-
- Read how to [setup and authenticate](/realtime/react-hooks) using the `@trigger.dev/react-hooks` package.
7+
These hooks allow you to subscribe to runs, batches, and streams using [Trigger.dev realtime](/realtime). They automatically include real-time updates for run status, metadata, output, and other properties.
138

149
## Hooks
1510

@@ -206,12 +201,14 @@ See our [Realtime documentation](/realtime) for more information.
206201
All realtime hooks automatically include metadata updates. Whenever your task updates metadata using `metadata.set()`, `metadata.append()`, or other metadata methods, your component will re-render with the updated data.
207202

208203
<Note>
209-
To learn how to write tasks that use metadata, see our [writing tasks using
204+
To learn how to write tasks with metadata updates, see our [writing tasks using
210205
metadata](/runs/metadata) guide.
211206
</Note>
212207

213208
### Progress monitoring
214209

210+
This example demonstrates how to create a progress monitor component that can be used to display the progress of a run:
211+
215212
```tsx
216213
"use client"; // This is needed for Next.js App Router or other RSC frameworks
217214

@@ -272,6 +269,8 @@ export function ProgressMonitor({
272269

273270
### Reusable progress bar
274271

272+
This example demonstrates how to create a reusable progress bar component that can be used to display the percentage progress of a run:
273+
275274
```tsx
276275
"use client";
277276

@@ -333,6 +332,8 @@ export function ProgressBar({ runId, publicAccessToken, title }: ProgressBarProp
333332

334333
### Status indicator with logs
335334

335+
This example demonstrates how to create a status indicator component that can be used to display the status of a run, and also logs that are emitted by the task:
336+
336337
```tsx
337338
"use client";
338339

@@ -392,6 +393,8 @@ export function StatusIndicator({ runId, publicAccessToken }: StatusIndicatorPro
392393

393394
### Multi-stage deployment monitor
394395

396+
This example demonstrates how to create a multi-stage deployment monitor component that can be used to display the progress of a deployment:
397+
395398
```tsx
396399
"use client";
397400

@@ -626,5 +629,3 @@ export function MyComponent({
626629
```
627630

628631
This allows you to change the ID of the subscription based on some state. Passing in a different ID will unsubscribe from the current subscription and subscribe to the new one (and remove any cached data).
629-
630-
<RealtimeExamplesCards />{" "}

docs/realtime/react-hooks/triggering.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ sidebarTitle: Triggering
44
description: Triggering tasks from your frontend application.
55
---
66

7-
import RealtimeExamplesCards from "/snippets/realtime-examples-cards.mdx";
8-
97
We provide a set of hooks that can be used to trigger tasks from your frontend application.
108

119
<Note>
@@ -194,5 +192,3 @@ export function MyComponent({ publicAccessToken }: { publicAccessToken: string }
194192
);
195193
}
196194
```
197-
198-
<RealtimeExamplesCards />{" "}

0 commit comments

Comments
 (0)