Skip to content

feat(rsc): reload stale clients after new deployments - #15318

Merged
jacob-ebey merged 1 commit into
mainfrom
rsc_client_version
Jul 16, 2026
Merged

jacob-ebey merged 1 commit into
mainfrom
rsc_client_version

Conversation

@jacob-ebey

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Build Available

Preview builds have been created for this PR. You can install react-router using:

pnpm install "remix-run/react-router#preview/pr-15318&path:packages/react-router"

And/or install other packages via:

pnpm install "remix-run/react-router#preview/pr-15318&path:packages/react-router-dev"
pnpm install "remix-run/react-router#preview/pr-15318&path:packages/react-router-express"
pnpm install "remix-run/react-router#preview/pr-15318&path:packages/react-router-node"
pnpm install "remix-run/react-router#preview/pr-15318&path:packages/react-router-serve"

These preview builds will be updated automatically as you push new commits.

@github-actions

Copy link
Copy Markdown
Contributor

βœ… CLA Signed

Thanks for signing the Contributor License Agreement.

@github-actions

Copy link
Copy Markdown
Contributor

βœ… Change File Found

One or more change files found.

Type Change
unstable Add unstable_rsc/client-version client build version virtual module
unstable Detect stale RSC clients during lazy route discovery and reload the destination document

}

if (
clientVersion !== undefined &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would this be undefined? In normal framework mode we rrequire it to be present and matching

  if (build.assets.version !== url.searchParams.get("version")) {
   // return 204
  }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non framework / development mode.


if (
clientVersion !== undefined &&
(await handleClientVersionMismatch(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This abstraction feels weird with the fact that it's async, returning a boolean or hanging promise, and used in an if statement here. I get why though - it seems the alternative is a decent bit of duplication and a handful of separate utilities :/

@jacob-ebey
jacob-ebey merged commit 6286f90 into main Jul 16, 2026
15 checks passed
@jacob-ebey
jacob-ebey deleted the rsc_client_version branch July 16, 2026 17:14
@github-actions

Copy link
Copy Markdown
Contributor

The preview branch preview/pr-15318 has been deleted now that this PR is merged/closed.

@ryanflorence ryanflorence mentioned this pull request Jul 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

πŸ€– Hello there,

We recently published version 8.3.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants