Skip to content

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

@sookmax

Description

@sookmax

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions