Skip to content

vinxi/routes page reload behavior on first hover preloading link #3279

Closed
@jellekuipers

Description

@jellekuipers

Which project does this relate to?

Start

Describe the bug

In the start-basic example, after starting the development server, the first time you hover the Users link in the navbar, logs are showing the following:

2:25:33 PM [vite] (ssr) page reload vinxi/routes
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x2)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x3)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x4)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x5)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x6)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x7)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x8)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x9)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x10)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x11)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x12)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x13)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x14)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x15)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x16)
2:25:33 PM [vite] (ssr) page reload vinxi/routes (x17)
Fetching users... @ http://localhost:3000/api/users

As mentioned, this only happens once after starting/restarting the development server, and I'm wondering whether this is desired behavior and/or if this might influence performance or functionality.

The preloading of Posts happens without the reloading.

If any additional information is needed, please let me know. Thanks in advance!

Your Example Website or App

https://github.com/TanStack/router/tree/main/examples/react/start-basic

Steps to Reproduce the Bug or Issue

  1. npm run dev the start-basic example and go to http://localhost:3000/
  2. In the navbar, hover Users
  3. See vinxi/routes reloading the page 17x.

Expected behavior

To either not see the page being refreshed 17 times, or perhaps only once depending on intended behavior.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Firefox
  • Version: 134.0.2

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