TanStack / TanStack/router

TanStackRouterDevtools adds visible delay when clicking on links - Firefox

Open
#4,484 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.1k
Forks
1.9k
Avg merge
1d 20h
Merged PRs (30d)
143

Description

Which project does this relate to?

Router

Describe the bug

Kind of a niche issue, since I could only replicate on Firefox but not Chrome:
I noticed a visible lag when I clicked on Links (or navigated) while having TanStackRouterDevtools on, and once I removed the component, navigation became super fast. Lag was greater with the addition of ReactQueryDevtools.

Your Example Website or App

https://stackblitz.com/edit/github-wkx9dbfv?file=src%2Fmain.tsx

Steps to Reproduce the Bug or Issue
  1. Open the example app in both Firefox and Chrome
  2. Navigate between About <-> Home and notice the lag happening in Firefox only
  3. Comment out the TanStackRouterDevtools component and notice that the lag goes away
Expected behavior

I expect that the use TanStackRouterDevtools does not incur lag on navigation

Screenshots or Videos

No response

Platform
  • OS: Windows
  • Browser: Chrome, Firefox
  • Version: latest (1.121.*) but also tested in 1.117 as well
Additional context

Maybe not worth looking into but worth documenting for other devs that might come across this issue, might save them some time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked StackBlitz example at src/main.tsx and reproduce navigation between Home and About in Firefox and Chrome. Compare navigation with TanStackRouterDevtools enabled and commented out, then inspect the devtools navigation-related entry points. Done means navigation no longer has a visible Firefox delay while the devtools remain enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
devtools, frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.