#defaultPendingComponent shown for routes that have no loader specified

7 messages · Page 1 of 1 (latest)

atomic frigate
#

See this reproduction: https://stackblitz.com/edit/tanstack-router-mbfafp?file=src%2Fmain.tsx

Even if I have no loader specified, the defaultPendingComponent is briefly rendered, and thus sometimes visible. This becomes more obvious when defaultPendingMs is set to zero - we will see the (unnecessary) pending component for half a second (the default of defaultPendingMinMs)

I think the pending component should only be rendered for routes that have a loader, right?

Run official live example code for Router Quickstart File Based, created by Tanstack on StackBlitz

#

I can set defaultPendingMinMs to zero as well; however, this sometimes makes the loader flash for me. A setting that seems to work well is:

defaultPendingMinMs: 0,
defaultPendingMs: 50,

but I would rather say that this is a bug and the loader shouldn't be rendered at all in those cases?

bitter trench
#

again something for @foggy solstice

foggy solstice
#

Probably has to do with the initial states of matches

#

Are these matches using routes with lazy components?

atomic frigate
#

In my code, yes. But the reproduction is without lazy route components

foggy solstice