Skip to content
Source
Sign inSign up
TanStack/router

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

MergedSheraff(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/8646/headmerged by Sheraff(GitHub profile, opens in a new tab)

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

x
0 of 10 viewed, 10 left
0 additions and 7 deletions.changeset/no-ssr-pending-hydration.mdDeleted
@@ -1,7 +0,0 @@
----
-'@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,6 +10,7 @@
import { matchContext } from './matchContext'
import { renderRouteNotFound } from './renderRouteNotFound'
import { ScrollRestoration } from './scroll-restoration'
+import { ClientOnly } from './ClientOnly'
import {
nonRouteComponentContext,
wrapInNonRouteComponentContext,
@@ -102,6 +103,9 @@
((route.options.errorComponent as any)?.preload || resolvedNoSsr))
​
let content = <MatchInner match={match} />
+ if (resolvedNoSsr) {