Skip to content

Commit 7ed8b46

Browse files
authored
Add timeout section to streaming wiki (#13415)
* Add timeout section to streaming wiki * Update contributors.yml
1 parent fccbc12 commit 7ed8b46

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

contributors.yml

+1
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@
369369
- willemarcel
370370
- williamsdyyz
371371
- willsawyerrrr
372+
- willsmithte
372373
- wkovacs64
373374
- xavier-lc
374375
- xcsnowcity

docs/how-to/suspense.md

+9
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,12 @@ function NonCriticalUI({ p }: { p: Promise<string> }) {
7575
return <h3>Non critical value {value}</h3>;
7676
}
7777
```
78+
79+
## Timeouts
80+
81+
By default, loaders and actions reject any outstanding promises after 4950ms. You can control this by exporting a `streamTimeout` numerical value from your `entry.server.tsx`.
82+
83+
```ts filename=entry.server.tsx
84+
// Reject all pending promises from handler functions after 10 seconds
85+
export const streamTimeout = 10_000;
86+
```

0 commit comments

Comments
 (0)