Add Built-in Support for Document Titles via Route Config #13853
FranVlahovic
started this conversation in
Proposals
Replies: 1 comment
-
The framework mode let's you export a MetaFunction you can use to set the title of that route And in general, with React 19 you could render the title tag at any point and React will move it to the head. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
While working on a new project as a beginner developer, I noticed that it's a bit repetitive to have to use useEffect in every route component just to update the document.title. It would be much more convenient if React Router supported setting a title directly inside the route configuration.
This would improve clarity, reduce boilerplate, and make route metadata more declarative. Here’s an example of how it might look:
Thanks for your beautiful library, keep up the good work!
Beta Was this translation helpful? Give feedback.
All reactions