Skip to content
Source
Sign inSign up
TanStack/router

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

MergedSheraff(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/8643/headmerged by Sheraff(GitHub profile, opens in a new tab)

Showing 10 changed files with 12 additions and 5 deletions (loading 8).

x
0 of 10 viewed, 10 left
7 additions and 0 deletions.changeset/no-ssr-pending-hydration.mdAdded
View file
@@ -0,0 +1,7 @@
+---
+'@tanstack/react-router': patch
+'@tanstack/solid-router': patch
+'@tanstack/vue-router': patch
+---
+​
+Keep the server-rendered pending component of `ssr: false` and `ssr: 'data-only'` routes mounted through hydration instead of mounting a second copy
5 additions and 5 deletionspackages/react-router/src/Match.tsxModified
View file
@@ -10,7 +10,6 @@
import { matchContext } from './matchContext'
import { renderRouteNotFound } from './renderRouteNotFound'
import { ScrollRestoration } from './scroll-restoration'
-import { ClientOnly } from './ClientOnly'
import {
nonRouteComponentContext,
wrapInNonRouteComponentContext,
@@ -103,9 +102,6 @@
((route.options.errorComponent as any)?.preload || resolvedNoSsr))
​
let content = <MatchInner match={match} />
- if (resolvedNoSsr) {