router icon indicating copy to clipboard operation
router copied to clipboard

Root route is rendered before loaders are finished

Open cristi-lng opened this issue 8 months ago • 10 comments

Describe the bug

It seems that the root route component is rendered before all the loaders finished their work.

If I understand correctly no component should be rendered until all loaders are finished. Is this still true?

When I test with a default pending component the behaviour seems to be correct. So, the problem is only when there is no pending component.

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-vkppeu?file=src%2Fmain.tsx

Steps to Reproduce the Bug or Issue

  1. Check the demo from the link
  2. See how the page is loaded and only the root component is displayed before the loaders finish
  3. You can toggle the defaultPendingComponent to test in pending mode

Expected behavior

If no pending is used, I am expecting to see everything rendered after the loaders are finished.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • @tanstack/react-router: 1.34.9

Additional context

No response

cristi-lng avatar Jun 04 '24 16:06 cristi-lng