T
TanStack10mo ago
absent-sapphire

defaultPendingMs and defaultPendingMinMs weird behavior.

Hi everyone, I’m encountering an issue that seems like a bug. I’ll try to break down the issue into two mutually exclusive scenarios. Scenario 1: If I have a route with a slow loader (>3s) and implement a pendingComponent with pendingMs and pendingMinMs on this specific route, navigating to it from another page displays the pendingComponent, which is fine. The problem arises when I hard reload the page on this route — it only shows a blank screen. The root config here is defaultPendingMinMs: 0 and defaultPendingMs: 0 Scenario 2: If I implement a defaultPendingComponent with defaultPendingMs and defaultPendingMinMs at the root level (in app.tsx, where I define the router), it shows a loader when I navigate to the slow route, which is perfect. It also shows a loader if I hard reload the page on the slow route, which is the expected behavior. However, this is where the issues arise, no matter where I hard reload, I always see the loader for the configured defaultPendingMinMs. The bottom line is that on a hard reload, defaultPendingMs is completely ignored, and the loader always appears. We really like the router, and everything else works great, but this is a significant blocker for us at the moment. Any help would be greatly appreciated.
2 Replies
harsh-harlequin
harsh-harlequin10mo ago
the hard reload behavior needs some overhaul, we are aware of that. can you please create a github issue so this is properly tracked?
absent-sapphire
absent-sapphireOP10mo ago
GitHub
Hard reload discord follow up · Issue #2784 · TanStack/router
Which project does this relate to? Router Describe the bug Hi all, This is a follow up issue after discord post. The original post is here If I have a route with a slow loader (>3s) and implemen...

Did you find this page helpful?