Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pending component doesn't work on root route #2317

Open
geoff-harper opened this issue Sep 10, 2024 · 0 comments
Open

Pending component doesn't work on root route #2317

geoff-harper opened this issue Sep 10, 2024 · 0 comments

Comments

@geoff-harper
Copy link

Which project does this relate to?

Router

Describe the bug

I've noticed the pending component doesn't stay mounted if it's on the __root route. It seems like it does quickly render but doesn't stay until the __root loader method is finished, instead it instantly unmounts

Your Example Website or App

https://codesandbox.io/p/devbox/epic-shape-z676nh

Steps to Reproduce the Bug or Issue

  1. Verify that you see a green box on first load to verify that non __root pending component works
  2. Go to src\routes\index.tsx and comment out the pending component and loader
  3. Go to src\routes\__root.tsx and uncomment the same code from previous file
  4. Verify that the green box does not appear after refreshing window

Expected behavior

I expect to see the green box upon loading after the 4th repro step. I've left a red box as the router's default pending component to show that does seem to be working normally in all relevant cases

Screenshots or Videos

No response

Platform

  • Version: 1.57.8

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant