You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/explanation/special-files.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,6 +229,32 @@ The `default` export of this module is a function that lets you create the respo
229
229
230
230
This module should render the markup for the current page using a `<ServerRouter>` element with the `context` and `url` for the current request. This markup will (optionally) be re-hydrated once JavaScript loads in the browser using the [client entry module][client-entry].
231
231
232
+
### `streamTimeout`
233
+
234
+
If you are [streaming] responses, you can export an optional `streamTimeout` value (in milliseconds) that will control the amount of time the server will wait for streamed promises to settle before rejecting outstanding promises them and closing the stream.
235
+
236
+
It's recommended to decouple this value from the timeout in which you abort the React renderer. You should always set the React rendering timeout to a higher value so it has time to stream down the underlying rejections from your `streamTimeout`.
237
+
238
+
```tsx lines=[1-2,13-15]
239
+
// Reject all pending promises from handler functions after 10 seconds
// Abort the streaming render pass after 11 seconds soto allow the rejected
252
+
// boundaries to be flushed
253
+
setTimeout(abort, streamTimeout+1000);
254
+
});
255
+
}
256
+
```
257
+
232
258
### `handleDataRequest`
233
259
234
260
You can export an optional `handleDataRequest` function that will allow you to modify the response of a data request. These are the requests that do not render HTML, but rather return the loader and action data to the browser once client-side hydration has occurred.
Copy file name to clipboardExpand all lines: docs/start/framework/installation.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,11 +33,16 @@ You can now open your browser to `http://localhost:5173`
33
33
34
34
You can [view the template on GitHub][default-template] to see how to manually set up your project.
35
35
36
-
To get started with a template that deploys to your preferred host, check out [all of our templates](https://github.com/remix-run/react-router-templates).
36
+
We also have a number of [ready to deploy templates][react-router-templates] available for you to get started with:
0 commit comments