-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Describe the bug
pendingComponent not shown while beforeLoad is executing, but according to the docs it should.
If this function returns a promise, the route will be put into a pending state and cause rendering to suspend until the promise resolves. If this routes pendingMs threshold is reached, the pendingComponent will be shown until it resolved.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-hvbscg
Steps to Reproduce the Bug or Issue
- refresh the page
- rootRoute.pendingComponent is not shown until rootRoute.beforeLoad resolves (you see white screen for 5 seconds)
- rootRoute.pendingComponent is shown for 500 (default pendingMinMs)
- rootRoute.component is shown
Expected behavior
rootRoute.pendingComponent should be rendered while waiting for rootRoute.beforeLoad to resolve, just like with loader
OR
we should update the docs if thats not the actual expected behavior.
Screenshots or Videos
No response
Platform
- OS: macOs
- Browser: Firefox
- Version: 121
Additional context
There is an open discussion about this behavior: #1029
reeved, michael-wolfenden, Andreeh, andrewbellucci, kasmacioma and 5 more
Metadata
Metadata
Assignees
Labels
No labels