TanStackT
TanStack15mo ago
3 replies
unexpected-ivory

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.
Was this page helpful?