0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00

fix: keep server-rendered pending UI of no-SSR routes through hydration (#8643)

* fix: keep server-rendered pending UI of no-SSR routes through hydration

Fixes #8640. The server rendered a no-SSR match's pending UI in a
ClientOnly fallback, while the hydrating client renders the presented
pending match through MatchInner. After hydration the switch replaced
(React: hid and duplicated) the server node. Render the server pending UI
through the same MatchInner pending path and drop the ClientOnly wrapper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: cover terminal no-SSR boundaries through hydration

Add error, notFound and URL not-found cases for `ssr: 'data-only'` and
`ssr: false` boundaries (plus a terminal child below a data-only boundary)
in React, Solid and Vue. Each case asserts the server payload, that the
server skeleton is the only one and is held for `pendingMinMs`, and that no
hydration mismatch is reported. The hold check catches mismatches that React
and Solid error boundaries replace silently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Flo 2026-10-09 20:40:06 +02:00 • committed by GitHub
commit ff9f753c09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 1006 additions and 90 deletions