-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
beforeLoad
adds ~400ms delay on page reload
#2183
Comments
beforeLoad
adds ~400ms delay on page rloadbeforeLoad
adds ~400ms delay on page reload
As a temporary fix, add |
I just saw this issue and added the temporary fix and my app feels way faster now... This needs a fix. |
Also noticed that adding this makes the app a lot more snappy, especially since we perform a lot of middleware/guard checks in Can be disabled for the entire router by setting |
Describe the bug
When adding
beforeLoad
to a route (even an empty one), the router gets mounted and then displays a white page for approx. 400ms before the actual page is rendered.Your Example Website or App
https://stackblitz.com/github/tanstack/router/tree/main/examples/react/quickstart-file-based
Steps to Reproduce the Bug or Issue
beforeLoad: () => {}
to any page - I chose the about page.Expected behavior
Simply adding the
beforeLoad
option should not materially change load times.Screenshots or Videos
router.mp4
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: