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

RouteOptions.pendingMs does not seem to have any effect. #2722

Open
sookmax opened this issue Nov 9, 2024 · 0 comments
Open

RouteOptions.pendingMs does not seem to have any effect. #2722

sookmax opened this issue Nov 9, 2024 · 0 comments

Comments

@sookmax
Copy link

sookmax commented Nov 9, 2024

Which project does this relate to?

Router

Describe the bug

Hey guys, I was trying to use RouteOptions.pendingMs in one of my FileRoute that contains beforeLoad(), and noticed the option doesn't seem to have any effect—i.e., pendingComponent is shown immediately no matter the value provided to pendingMs (0 or 100000).

This is also the case for RouteOptions.loader() as well.

Your Example Website or App

https://stackblitz.com/edit/vitejs-vite-omuhov?file=src%2Froutes%2Findex.tsx

Steps to Reproduce the Bug or Issue

  1. refresh the preview browser on the right in the stackblitz sandbox at '/'
  2. see if 'Loading...' text is shown immediately after the refresh
  3. check pendingMs in src/routes/index.tsx is 1000000
  4. do the same for '/about' route (for beforeLoad() case)

Expected behavior

When RouteOptions.pendingMs is specified, the pendingComponent should not be shown unless the loader or beforeLoad takes longer than specified pendingMs.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 130.0.6723.70

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