react-helmet
react-helmet copied to clipboard
Title change when out focus tab browser reactjs
Hello, I have a bug with the title of the helmet. When I run the app for the first time, and when I navigated to another page of the app, the title was normal, but the problem began to appear when I clicked on another tab and then returned, my title was changed to the default title.
Step description: page Home(title: home) (click) -> page Detail(title: detail) (click)->tab another of browser(title: home)
Version: "react": "^16.4.1", "react-dom": "^16.4.1", "react-helmet": "^5.2.1",
Thanks in advance!
Any update on this problem?
I have a similar problem where I set the title to "Loading" whilst the page is loading, and then to the real title once the page loads. If this happens whilst the user is in another tab, the page stays at "Loading" until you click on the tab, even though the page has loaded.
Edit: Turns out this is a common issue, and is fixed just by adding defer={false}
as a prop.
More info here: https://github.com/nfl/react-helmet/issues/314#issuecomment-326056604
http://localhost:3000/
Thanks @modulareverything, came across your comment from Google and that solved it. IMO defer={false}
should be the default; I don't see the use case.