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

The onLoad event will not be triggered by the router object when the page is loaded for the first time #3676

Open
ilxqx opened this issue Mar 6, 2025 · 0 comments

Comments

@ilxqx
Copy link

ilxqx commented Mar 6, 2025

Which project does this relate to?

Router

Describe the bug

The onLoad event will not be triggered by the router object when the page is loaded for the first time. However, the onLoad event is correctly triggered when switching to the routing page later.

Your Example Website or App

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

Steps to Reproduce the Bug or Issue

  1. Go to the link to reproduce the issue
  2. The issue should be visible on the first load, with the NProgress progress bar spinning at the top, because the onLoad event was not triggered
  3. Clicking the Home or About links on the top to switch routes will end the progress bar normally, because the router object successfully triggered the onLoad event
  4. To reproduce the issue again, you can click the refresh icon above
Image

Expected behavior

The onLoad event is correctly triggered on the first load.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 1.112.17

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