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)

🎯 Changes

Reverts #8643. Reopens #8640 until a proper fix lands.

#8643 introduced a React hydration mismatch. It affects ssr: false and ssr: 'data-only' routes that have no pendingComponent (and no defaultPendingComponent). React hydrates the route's Suspense boundary after the shell commits. The client load starts in between, and for data-only routes it commits immediately. The boundary then hydrates the route component against the server's pending UI:

Hydration failed because the server rendered HTML didn't match the client.
...
  <Suspense fallback={null}>
    <MatchInnerImpl ...>
      <Item>
+       <button ...>

Before #8643, ClientOnly rendered its fallback during hydration whatever the match status was, which hid this. The #8643 tests all used a pendingComponent, so they missed it.

Solid and Vue are reverted too. The change was shared across the adapters, and it is easier to redo all three together.

The changeset is removed with the revert. #8643 was never released, so no changeset is needed.

AI-assisted (Claude).

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with the relevant test commands, or tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved pending UI behavior for routes configured with ssr: false or ssr: 'data-only' across React, Solid, and Vue routers. These routes now show their pending UI during server rendering and use it as the client-only fallback while route content becomes available.
    • Pending UI now reflects the route’s actual pending status rather than appearing solely because rendering is on the server.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-router

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: solid-router

    3. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: vue-router

    4. View your CI Pipeline Execution ↗ for commit 6209e8d20ffb23a8fc5c6ac6738ac2fffd6a37b2

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded11m 59sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded2m 13sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-10-09 19:34:25 UTC

    5. Review in Change Stack →

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: Repository: TanStack/router/.coderabbit.yaml
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: b2fe0142-4182-4f45-bd1d-ead40d2c3981

      📥 Commits

      Reviewing files that changed from the base of the PR and between ff9f753c090c2f8832a06204a1c3b56c4c5d885f and 6209e8d20ffb23a8fc5c6ac6738ac2fffd6a37b2.


      📒 Files selected for processing (10)
      • .changeset/no-ssr-pending-hydration.md
      • packages/react-router/src/Match.tsx
      • packages/react-router/tests/issue-8640-data-only-pending-hydration.test.tsx
      • packages/solid-router/src/Match.tsx
      • packages/solid-router/tests/issue-8640-data-only-pending-hydration.test.tsx
      • packages/solid-router/tests/issue-8640/client-entry.tsx
      • packages/solid-router/tests/issue-8640/routeTree.tsx
      • packages/solid-router/tests/issue-8640/server-entry.tsx
      • packages/vue-router/src/Match.tsx
      • packages/vue-router/tests/issue-8640-data-only-pending-hydration.test.tsx

      💤 Files with no reviewable changes (7)
      • .changeset/no-ssr-pending-hydration.md
      • packages/react-router/tests/issue-8640-data-only-pending-hydration.test.tsx
      • packages/solid-router/tests/issue-8640-data-only-pending-hydration.test.tsx
      • packages/solid-router/tests/issue-8640/client-entry.tsx
      • packages/solid-router/tests/issue-8640/routeTree.tsx
      • packages/solid-router/tests/issue-8640/server-entry.tsx
      • packages/vue-router/tests/issue-8640-data-only-pending-hydration.test.tsx

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.



      📝 Walkthrough

      Walkthrough

      React, Solid, and Vue route matches now wrap routes with ssr: false or ssr: 'data-only' in ClientOnly, using pending content as fallback. The PR also removes the related hydration tests and changeset.

      Changes

      No-SSR route rendering

      Layer / File(s)Summary
      React route match rendering
      packages/react-router/src/Match.tsx, packages/react-router/tests/issue-8640-data-only-pending-hydration.test.tsx, .changeset/no-ssr-pending-hydration.md
      React wraps no-SSR route content in ClientOnly with pending content as fallback. The pending branch now checks match status. The hydration test and changeset were removed.
      Solid route match rendering
      packages/solid-router/src/Match.tsx, packages/solid-router/tests/issue-8640/*
      Solid adjusts pending and Suspense fallback conditions, and wraps no-SSR matches in ClientOnly. The hydration test and its route and document helpers were removed.
      Vue route match rendering
      packages/vue-router/src/Match.tsx, packages/vue-router/tests/issue-8640-data-only-pending-hydration.test.tsx
      Vue wraps no-SSR matches in ClientOnly with the resolved pending component as fallback. MatchInner now renders pending content when the match status is pending. The hydration test was removed.

      Priority: ➖ Normal

      Estimated code review effort: 3 (Moderate) | ~20 minutes

      Change: Bug fix

      Suggested reviewers: schiller-manuel


      Merge Risk: ⚪ Minimal · up to 6209e

      No actionable merge-blocking issue is established; the change is mergeable after normal checks.

      Pre-merge checks | Passed 4 | Failed 1

      ❌ Failed checks (1 warning)

      Check nameStatusExplanationResolution
      Docstring CoverageWarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files.Write docstrings for the functions missing them to satisfy the coverage threshold.
      ✅ Passed checks (4 passed)
      Check nameStatusExplanation
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Title checkPassedThe title clearly identifies the revert and its effect on server-rendered pending UI for no-SSR routes during hydration.
      Description checkPassedThe description explains the motivation, affected adapters, hydration mismatch, issue references, AI assistance, and changeset handling. The testing checklist remains unchecked, and neither release-im…


      • Fix all pre-merge checks with AI
      ✨ Finishing Touches 💡 2
      📝 Generate docstrings 💡
      • Commit to this branch
      • Create a new PR

      🧪 Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR


      🛠️ Fix failing CI checks 💡
      • Commit to this branch
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    6. 🚀 Changeset Version Preview

      5 package(s) bumped directly, 19 bumped as dependents.

      🟩 Patch bumps

      PackageVersionReason
      @tanstack/history1.162.4 → 1.162.5Changeset
      @tanstack/react-router1.170.41 → 1.170.42Changeset
      @tanstack/router-core1.171.34 → 1.171.35Changeset
      @tanstack/solid-router1.170.38 → 1.170.39Changeset
      @tanstack/vue-router1.170.37 → 1.170.38Changeset
      @tanstack/react-start1.168.60 → 1.168.61Dependent
      @tanstack/react-start-client1.168.39 → 1.168.40Dependent
      @tanstack/react-start-rsc0.1.59 → 0.1.60Dependent
      @tanstack/react-start-server1.167.46 → 1.167.47Dependent
      @tanstack/router-cli1.167.40 → 1.167.41Dependent
      @tanstack/router-generator1.167.40 → 1.167.41Dependent
      @tanstack/router-plugin1.168.42 → 1.168.43Dependent
      @tanstack/router-vite-plugin1.167.42 → 1.167.43Dependent
      @tanstack/solid-start1.168.57 → 1.168.58Dependent
      @tanstack/solid-start-client1.168.37 → 1.168.38Dependent
      @tanstack/solid-start-server1.167.44 → 1.167.45Dependent
      @tanstack/start-client-core1.170.34 → 1.170.35Dependent
      @tanstack/start-plugin-core1.171.49 → 1.171.50Dependent
      @tanstack/start-server-core1.169.39 → 1.169.40Dependent
      @tanstack/start-static-server-functions1.167.39 → 1.167.40Dependent
      @tanstack/start-storage-context1.167.36 → 1.167.37Dependent
      @tanstack/vue-start1.168.56 → 1.168.57Dependent
      @tanstack/vue-start-client1.167.40 → 1.167.41Dependent
      @tanstack/vue-start-server1.167.44 → 1.167.45Dependent
    7. Bundle Size Benchmarks

      • Commit: 25f9505505e9
      • Measured at: 2026-10-09T19:22:56.028Z
      • Baseline source: history:ff9f753c090c
      • Dashboard: bundle-size history

      The following scenarios have bundle-size changes compared with the baseline:

      ScenarioCurrent (gzip)Initial (gzip)RawBrotliTrend
      react-router.minimal84.0&nbsp;KiB
      +78&nbsp;B
      83.8&nbsp;KiB
      +76&nbsp;B
      261.4&nbsp;KiB
      +247&nbsp;B
      73.2&nbsp;KiB
      +98&nbsp;B
      ▅▅▅███████▁█
      react-router.full87.5&nbsp;KiB
      +10&nbsp;B
      87.4&nbsp;KiB
      +9&nbsp;B
      273.2&nbsp;KiB
      +45&nbsp;B
      76.4&nbsp;KiB
      +54&nbsp;B
      ▁▁▁███████▆█
      solid-router.minimal33.5&nbsp;KiB
      +80&nbsp;B
      33.4&nbsp;KiB
      +83&nbsp;B
      95.7&nbsp;KiB
      +447&nbsp;B
      30.3&nbsp;KiB
      +138&nbsp;B
      ███▆▆▆▆▆▆▆▁▆
      solid-router.full38.4&nbsp;KiB
      +62&nbsp;B
      38.3&nbsp;KiB
      +61&nbsp;B
      110.5&nbsp;KiB
      +302&nbsp;B
      34.7&nbsp;KiB
      +97&nbsp;B
      ███▇▇▇▇▇▇▇▁▇
      vue-router.minimal49.5&nbsp;KiB
      +48&nbsp;B
      49.3&nbsp;KiB
      +50&nbsp;B
      136.6&nbsp;KiB
      +166&nbsp;B
      44.8&nbsp;KiB
      +105&nbsp;B
      ▂▂▂███████▁█
      vue-router.full55.1&nbsp;KiB
      +45&nbsp;B
      55.0&nbsp;KiB
      +46&nbsp;B
      154.9&nbsp;KiB
      +166&nbsp;B
      49.8&nbsp;KiB
      +144&nbsp;B
      ▁▁▁███████▁█
      react-start.minimal96.7&nbsp;KiB
      +21&nbsp;B
      96.6&nbsp;KiB
      +23&nbsp;B
      302.2&nbsp;KiB
      +133&nbsp;B
      83.9&nbsp;KiB
      -69&nbsp;B
      ███▇▇▇▇▇▇▃▁▃
      react-start.query-integration104.2&nbsp;KiB
      +28&nbsp;B
      104.0&nbsp;KiB
      +29&nbsp;B
      328.8&nbsp;KiB
      +125&nbsp;B
      90.4&nbsp;KiB
      -7&nbsp;B
      ▆▆▆██████▃▁▃
      react-start.deferred-hydration97.4&nbsp;KiB
      +24&nbsp;B
      96.6&nbsp;KiB
      +23&nbsp;B
      303.6&nbsp;KiB
      +133&nbsp;B
      84.6&nbsp;KiB
      -52&nbsp;B
      █████████▃▁▃
      react-start.full99.9&nbsp;KiB
      +9&nbsp;B
      99.8&nbsp;KiB
      +10&nbsp;B
      312.0&nbsp;KiB
      +45&nbsp;B
      86.7&nbsp;KiB
      +15&nbsp;B
      ▆▆▆██████▂▁▂
      react-start.rsbuild.minimal100.3&nbsp;KiB
      +29&nbsp;B
      100.2&nbsp;KiB
      +29&nbsp;B
      313.2&nbsp;KiB
      +147&nbsp;B
      86.6&nbsp;KiB
      -43&nbsp;B
      ▃▃▃██████▃▁▃
      react-start.rsbuild.minimal-iife100.7&nbsp;KiB
      +28&nbsp;B
      100.6&nbsp;KiB
      +28&nbsp;B
      314.2&nbsp;KiB
      +147&nbsp;B
      87.0&nbsp;KiB
      -27&nbsp;B
      ▃▃▃██████▃▁▃
      react-start.rsbuild.full103.6&nbsp;KiB
      +8&nbsp;B
      103.4&nbsp;KiB
      +8&nbsp;B
      323.3&nbsp;KiB
      +45&nbsp;B
      89.4&nbsp;KiB
      +11&nbsp;B
      ▂▂▂██████▂▁▂
      solid-start.minimal46.2&nbsp;KiB
      +75&nbsp;B
      46.1&nbsp;KiB
      +73&nbsp;B
      135.4&nbsp;KiB
      +445&nbsp;B
      41.2&nbsp;KiB
      +53&nbsp;B
      ███▅▅▅▅▅▅▄▁▄
      solid-start.deferred-hydration49.3&nbsp;KiB
      +88&nbsp;B
      46.2&nbsp;KiB
      +89&nbsp;B
      142.8&nbsp;KiB
      +451&nbsp;B
      44.0&nbsp;KiB
      +75&nbsp;B
      ███▅▅▅▅▅▅▄▁▄
      solid-start.full51.4&nbsp;KiB
      +51&nbsp;B
      51.3&nbsp;KiB
      +51&nbsp;B
      150.8&nbsp;KiB
      +299&nbsp;B
      45.6&nbsp;KiB
      -16&nbsp;B
      ███▆▆▆▆▆▆▄▁▄
      vue-start.minimal65.4&nbsp;KiB
      +51&nbsp;B
      65.3&nbsp;KiB
      +52&nbsp;B
      185.9&nbsp;KiB
      +166&nbsp;B
      58.4&nbsp;KiB
      0&nbsp;B
      ▇▇▇██████▅▁▅
      vue-start.full69.3&nbsp;KiB
      +59&nbsp;B
      69.1&nbsp;KiB
      +57&nbsp;B
      198.3&nbsp;KiB
      +166&nbsp;B
      61.8&nbsp;KiB
      +62&nbsp;B
      ███▇▇▇▇▇▇▄▁▄

      Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better.

    8. More templates

      @tanstack/arktype-adapter

      npm i https://pkg.pr.new/@tanstack/arktype-adapter@8646

      @tanstack/eslint-plugin-router

      npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@8646

      @tanstack/eslint-plugin-start

      npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@8646

      @tanstack/history

      npm i https://pkg.pr.new/@tanstack/history@8646

      @tanstack/nitro-v2-vite-plugin

      npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@8646

      @tanstack/react-router

      npm i https://pkg.pr.new/@tanstack/react-router@8646

      @tanstack/react-router-devtools

      npm i https://pkg.pr.new/@tanstack/react-router-devtools@8646

      @tanstack/react-router-ssr-query

      npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@8646

      @tanstack/react-start

      npm i https://pkg.pr.new/@tanstack/react-start@8646

      @tanstack/react-start-client

      npm i https://pkg.pr.new/@tanstack/react-start-client@8646

      @tanstack/react-start-rsc

      npm i https://pkg.pr.new/@tanstack/react-start-rsc@8646

      @tanstack/react-start-server

      npm i https://pkg.pr.new/@tanstack/react-start-server@8646

      @tanstack/router-cli

      npm i https://pkg.pr.new/@tanstack/router-cli@8646

      @tanstack/router-core

      npm i https://pkg.pr.new/@tanstack/router-core@8646

      @tanstack/router-devtools

      npm i https://pkg.pr.new/@tanstack/router-devtools@8646

      @tanstack/router-devtools-core

      npm i https://pkg.pr.new/@tanstack/router-devtools-core@8646

      @tanstack/router-generator

      npm i https://pkg.pr.new/@tanstack/router-generator@8646

      @tanstack/router-plugin

      npm i https://pkg.pr.new/@tanstack/router-plugin@8646

      @tanstack/router-ssr-query-core

      npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@8646

      @tanstack/router-utils

      npm i https://pkg.pr.new/@tanstack/router-utils@8646

      @tanstack/router-vite-plugin

      npm i https://pkg.pr.new/@tanstack/router-vite-plugin@8646

      @tanstack/solid-router

      npm i https://pkg.pr.new/@tanstack/solid-router@8646

      @tanstack/solid-router-devtools

      npm i https://pkg.pr.new/@tanstack/solid-router-devtools@8646

      @tanstack/solid-router-ssr-query

      npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@8646

      @tanstack/solid-start

      npm i https://pkg.pr.new/@tanstack/solid-start@8646

      @tanstack/solid-start-client

      npm i https://pkg.pr.new/@tanstack/solid-start-client@8646

      @tanstack/solid-start-server

      npm i https://pkg.pr.new/@tanstack/solid-start-server@8646

      @tanstack/start-client-core

      npm i https://pkg.pr.new/@tanstack/start-client-core@8646

      @tanstack/start-fn-stubs

      npm i https://pkg.pr.new/@tanstack/start-fn-stubs@8646

      @tanstack/start-plugin-core

      npm i https://pkg.pr.new/@tanstack/start-plugin-core@8646

      @tanstack/start-server-core

      npm i https://pkg.pr.new/@tanstack/start-server-core@8646

      @tanstack/start-static-server-functions

      npm i https://pkg.pr.new/@tanstack/start-static-server-functions@8646

      @tanstack/start-storage-context

      npm i https://pkg.pr.new/@tanstack/start-storage-context@8646

      @tanstack/valibot-adapter

      npm i https://pkg.pr.new/@tanstack/valibot-adapter@8646

      @tanstack/virtual-file-routes

      npm i https://pkg.pr.new/@tanstack/virtual-file-routes@8646

      @tanstack/vue-router

      npm i https://pkg.pr.new/@tanstack/vue-router@8646

      @tanstack/vue-router-devtools

      npm i https://pkg.pr.new/@tanstack/vue-router-devtools@8646

      @tanstack/vue-router-ssr-query

      npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@8646

      @tanstack/vue-start

      npm i https://pkg.pr.new/@tanstack/vue-start@8646

      @tanstack/vue-start-client

      npm i https://pkg.pr.new/@tanstack/vue-start-client@8646

      @tanstack/vue-start-server

      npm i https://pkg.pr.new/@tanstack/vue-start-server@8646

      @tanstack/zod-adapter

      npm i https://pkg.pr.new/@tanstack/zod-adapter@8646

      commit: 6209e8d

    9. Merging this PR will degrade performance by 3.77%

      :information_source: 99 benchmarks have no flame graph

      The flamegraph could not be generated because too much time was spent in runtime internals, making the visualization not useful for performance analysis.

      :warning: Different runtime environments detected

      Some benchmarks with significant performance changes were compared across different runtime environments, which may affect the accuracy of the results.

      Open the report in CodSpeed to investigate

      ⚡ 4 improved benchmarks ❌ 18 (👁 18) regressed benchmarks ✅ 172 untouched benchmarks ⏩ 3 skipped benchmarks1

      Performance Changes

      ModeBenchmarkBASEHEADEfficiency
      ⚡Memorymem server aborted-requests (solid)152 KB142.7 KB+6.53%
      ⚡Memorymem server error-paths redirect (react)12.4 KB11.9 KB+4.42%
      ⚡Memorymem server request-churn (solid)134.4 KB129.5 KB+3.8%
      ⚡Memorymem client unique-location-churn (solid)63.7 KB61.5 KB+3.44%
      👁Simulationclient-side navigation loop (solid)155.2 ms160.5 ms-3.35%
      👁Simulationclient-async-pipeline navigation loop (solid)107.2 ms113 ms-5.15%
      👁Simulationclient-control-flow navigation loop (solid)94 ms99 ms-5.12%
      👁Simulationclient-head navigation loop (solid)387.9 ms401.7 ms-3.44%
      👁Simulationclient-history navigation loop (solid)88 ms94.1 ms-6.48%
      👁Simulationclient-loaders navigation loop (solid)137.3 ms144.1 ms-4.7%
      👁Simulationclient-mount loop (solid)87.6 ms90.5 ms-3.21%
      👁Simulationclient-nested-params navigation loop (solid)691.1 ms761.8 ms-9.27%
      👁Simulationclient-preload interaction loop (solid)144.5 ms150.9 ms-4.24%
      👁Simulationclient-route-tree-scale navigation loop (solid)206.2 ms220.1 ms-6.3%
      👁 :information_source:Simulationclient-search-params navigation loop (solid)216.5 ms223.6 ms-3.2%
      👁Simulationclient-rewrites navigation loop (solid)120.4 ms128.2 ms-6.1%
      👁Memorymem server error-paths error (vue)114.2 KB119.5 KB-4.42%
      👁Memorymem server error-paths not-found (vue)121.6 KB127.8 KB-4.84%
      👁Memorymem client unique-location-churn (vue)88.9 KB96.2 KB-7.66%
      👁Memorymem client mount-unmount (solid)76.4 KB80.9 KB-5.57%
      ..................

      :information_source: Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

      [!TIP] Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


      Comparing revert/8643-no-ssr-pending-hydration (6209e8d) with main (ff9f753) Open in CodSpeed

      Footnotes

      1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Sign in to join this conversation.