Skip to content

pendingComponent flicker on every route navigation #8049

Description

@djlguzman

Which project does this relate to?

Router

Describe the bug

With defaultPendingMs: 0, defaultPendingMinMs: 0 and a defaultPendingComponent, every navigation to a code-split route briefly shows the pending UI, even when the route was previously visited. In 1.170.18, the same config did not flash at all. See differences in videos attached.

Complete minimal reproducer

https://github.com/djlguzman/tanstack-start-pending-component-flash

Steps to Reproduce the Bug

  1. Clone repo from: https://github.com/djlguzman/tanstack-start-pending-component-flash
  2. run pnpm install
  3. run pnpm dev
  4. Changing from "Home" and "Test" pages (with SLOW network if possible) will only showing the pending component ONCE.

  1. run pnpm add @tanstack/react-devtools@0.10.10 @tanstack/react-router@1.170.27 @tanstack/react-router-devtools@1.167.1 @tanstack/react-start@1.168.44
  2. run pnpm add -D @tanstack/devtools-vite@0.8.3 @tanstack/router-cli@1.167.28
  3. run pnpm dev
  4. It should be broken by now and pending UI will get shown at all navigation.

Expected behavior

At version 1.170.18, previously loaded routes won't show the pending UI at all when revisited which I believe is the correct way. With the succeeding versions, pending UI shows all the time when visiting routes.

Screenshots or Videos

https://github.com/user-attachments/assets/7938f91f-d3c4-42bd-afd3-58365dc2cabd
https://github.com/user-attachments/assets/be3c35fd-a8eb-420c-b92b-5f10cffc096d

Platform

  • Router / Start Version: @tanstack/react-router@1.170.27
  • OS: macOS
  • Browser: Chrome
  • Browser Version: Version 151.0.7922.137
  • Bundler: vite
  • Bundler Version: 8.0.0

Additional context

I've already read related issues about this which were already closed but seems this may be a different issue as I still experience this flickering issue even with the latest tanstack router version installed. Thank you very much!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions