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

defaultPendingMs not applying on page load #2140

Open
jjonesrs opened this issue Aug 17, 2024 · 0 comments
Open

defaultPendingMs not applying on page load #2140

jjonesrs opened this issue Aug 17, 2024 · 0 comments

Comments

@jjonesrs
Copy link

Describe the bug

Version 1.45.2:

Versions 1.45.3 - 1.48.1:

  • The pending component no longer appears on hard-load for the layout.
  • However, it still immediately shows on hard-load for the about page component itself, i.e. under the nav.

image

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-hsmnzk?file=src%2Fmain.tsx&preset=node

Steps to Reproduce the Bug or Issue

To make the behavior more noticeable, I made the following adjustments to the forked reproducer:

  • Set defaultPendingMs to 5000ms
  • Left the loader delay at 500ms

Steps:

  1. While on the home page, click the about link. Observe a brief (500ms) delay before the about page loads. The pending component does not show.
  2. While on the about page, click the page reload button. Observe the pending component immediately show for defaultPendingMinMs (5000ms).

Expected behavior

The pending component should only show if the pending state lasts for at least defaultPendingMs. In this reproducer, defaultPendingMs is set to 5000ms and the loader takes 500ms, so the pending component should not show.

Screenshots or Videos

No response

Platform

Any

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