Skip to content

Commit e9bb9f1

Browse files
authored
Updated dependencies to latest react-router v7 and hono server (#23)
# Description Update dependencies to latest versions
1 parent 0a8dce4 commit e9bb9f1

File tree

3 files changed

+748
-70
lines changed

3 files changed

+748
-70
lines changed

app/entry.server.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import i18n from "./localization/i18n" // your i18n configuration file
99
import i18nextOpts from "./localization/i18n.server"
1010
import { resources } from "./localization/resource"
1111

12-
const ABORT_DELAY = 5000
12+
// Reject all pending promises from handler functions after 10 seconds
13+
export const streamTimeout = 10000
1314

1415
export default async function handleRequest(
1516
request: Request,
@@ -38,7 +39,7 @@ export default async function handleRequest(
3839

3940
const { pipe, abort } = renderToPipeableStream(
4041
<I18nextProvider i18n={instance}>
41-
<ServerRouter abortDelay={ABORT_DELAY} context={context} url={request.url} />
42+
<ServerRouter context={context} url={request.url} />
4243
</I18nextProvider>,
4344
{
4445
[callbackName]: () => {
@@ -66,7 +67,8 @@ export default async function handleRequest(
6667
},
6768
}
6869
)
69-
70-
setTimeout(abort, ABORT_DELAY)
70+
// Abort the streaming render pass after 11 seconds so to allow the rejected
71+
// boundaries to be flushed
72+
setTimeout(abort, streamTimeout + 1000)
7173
})
7274
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"dependencies": {
3030
"@forge42/seo-tools": "1.3.0",
31-
"@react-router/node": "7.0.1",
31+
"@react-router/node": "7.1.0",
3232
"clsx": "2.1.1",
3333
"hono": "4.6.12",
3434
"i18next": "23.15.2",
@@ -39,8 +39,8 @@
3939
"react": "19.0.0",
4040
"react-dom": "19.0.0",
4141
"react-i18next": "15.1.1",
42-
"react-router": "7.0.1",
43-
"react-router-hono-server": "2.0.0",
42+
"react-router": "7.1.0",
43+
"react-router-hono-server": "2.6.2",
4444
"remix-hono": "0.0.16",
4545
"remix-i18next": "7.0.0",
4646
"tailwind-merge": "2.5.4",
@@ -50,8 +50,8 @@
5050
"@babel/preset-typescript": "7.26.0",
5151
"@biomejs/biome": "1.9.4",
5252
"@dotenvx/dotenvx": "1.24.5",
53-
"@react-router/dev": "7.0.1",
54-
"@react-router/fs-routes": "7.0.1",
53+
"@react-router/dev": "7.1.0",
54+
"@react-router/fs-routes": "7.1.0",
5555
"@testing-library/react": "16.0.1",
5656
"@types/node": "22.9.1",
5757
"@types/prompt": "1.1.9",

0 commit comments

Comments
 (0)