question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’ve noticed that there’s a bit of a lag between a route changing and the title property updating. I’m guessing that this is around 200 - 300ms. While minor, it does look just a bit off. I experience this in both my project and also running the react-helmet-example. Are there any suggestions about reducing this lag? If not, is there any known faster way to update the document’s title?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:42
  • Comments:25 (1 by maintainers)

github_iconTop GitHub Comments

50reactions
dpehrsoncommented, May 1, 2017

This is probably out of the scope of this library, but I thought I’d pop in a note of where this is problematic: Analytics.

I am sending Google Tag Manager events on history change, and the events getting sent to Google Analytics are always off-by-one on the URL <-> Browser Title relationship.

Hooks I’ve tried in my setup:

  1. history.listen(): Fires before the title is updated
  2. <Route onChange/>: Fires before the title is updated
  3. componentDidUpdate(): Fires before the title is updated

The only hook I’ve found where I can get the correct timing is in <Helmet onChangeClientState/> but I then need to coordinate that with other callbacks to ensure analytics calls are made only at the right times.

To note again: I don’t actually think this is helmet’s problem, but I probably won’t be the last person to hit a wall here and wanted to leave some information behind.

19reactions
krismeistercommented, Feb 14, 2019

Alot of overkill fixes on this thread, you can set the title tag easily through window.document.title and its immediate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FIFA 22 Title Update 6: Bugs & Input Lag
Players mainly complain about Button Responsiveness, Game Slowness, Temporary Freezing and Catch-Up Lag.
Read more >
FIFA 22 title update #3 patch notes: Second-half lag, ...
It finally fixes the second-half lag and stops defenses dropping too far back. We've got the full patch notes below.
Read more >
FIFA 22 PC SUTTER AND LAG AFTER PATCH - Answers HQ
Solved: So PC players had a big problem with the game. Everytime you shoot and the defender blocks it, the game stuttered. We...
Read more >
Sunbreak - input lag since Title Update 1 : r/MHRise
I haven't had any input delay issues since the update (outside of the usual input eating that the game has done since day...
Read more >
Extreme lag and low fps on title screen/game/lobby
Extreme lag and low fps on title screen/game/lobby · Start by uninstalling them, you want to do a clean reinstall · Go to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found