We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
So far there is no way to modify the title of the page according to the active page. A library like react-helmet should do the trick,
react-helmet
The text was updated successfully, but these errors were encountered:
In commit 3836ff2 I set the title with a simple switch case. A more declarative way of using a component in the actual would be more "react-way".
I use a simple switch case in the Navbar.js that check the current url.
Navbar.js
const getName = (link) => { switch (link) { case "/parts": return "Parts printing page"; case "/inventory": return "Inventory recap page"; case "/printer": return "Printer fleet overview"; case "/": return "Home page"; default: return link; } };
Sorry, something went wrong.
This example creates a declarative way that handles the state change of component. This example is used to change the document.title but could be readapted to set the title of the page. https://github.com/gaearon/react-document-title/blob/master/index.js this library is using https://github.com/gaearon/react-side-effect/blob/master/src/index.js
document.title
No branches or pull requests
So far there is no way to modify the title of the page according to the active page. A library like
react-helmet
should do the trick,The text was updated successfully, but these errors were encountered: