#pendingComponent - not rendered

5 messages · Page 1 of 1 (latest)

vernal furnace
#

Hey folks,

Before creating an issue, I kinda want to check if I'm just doing something wrong on my end: I'm on beta.86, trying to get a loading spinner to render while my loader is loading. Added the pendingComponent to my route but nothing is rendering while it loads. What I tried:

  • Add wrapInSuspense: true|false to itself and higher level routes
  • Add a defaultPendingComponent to the router instance.

I tried the React Example: With Trpc after fixing it up and dowgrading it to 86 (https://stackblitz.com/edit/tanstack-router-qrmscu?file=package.json), but I only see the small, local, spinners?

StackBlitz

Run official live example code for Router With Trpc, created by Tanstack on StackBlitz

dry bronze
#

Same here, I don't see any render of any pendingComponent... Is there a version where this feature is ok ?

vernal furnace
#

So after some testing, it seems pendingComponent is only rendered when the actual route component is lazy loaded (via React.lazy). I'm not sure if that is expected behaviour, I would've thought it should also render when the loader of the route is not ready yet...

neat ridge
vernal furnace
#

Yea I think it was also broken in latest beta, has to downgrade to get it working AFAIK