You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @oayres
Hope you are well.
I have a react project that needs to be sever-side rendering or pre-rendering.
I'd like to change the <title></title> and <meta name="description> dynamically according to the route.
I am using Redux.
Well, is it possible to change the title and meta tags dynamically if I install this package?
TBH, I've attempted several server-side rendering/pre-rendering libraries and still rendering static meta tags.
Many thanks.
The text was updated successfully, but these errors were encountered:
Hi @developer7132
I recommend using React Helmet to achieve this. You can see their server usage (with helmet.renderStatic()) in their docs.
To achieve this in react-ssr, you'd need to leverage the Html config property and use your own HTML 'skeleton'. However, the default template included inside react-ssr does do a safe require of Helmet and includes the rendering of meta tags and title tags, so you may not need to override the template if this is all you'd like.
It's worth me stressing here that react-ssr only has some skeletal support for a small subset of users. I can update the library with some refreshers and improvements if you decide to go ahead with it.
Irrespective of this, react-helmet is probably the way to go whether you use this package, another one, or prerender. My advice is to pre-render for most people because it simplifies life and your app only has to worry about rendering in one "enviornment" (a browser).
Hope this helps and thanks for dropping by the package! I'll keep this open for a short period incase you have any follow-up.
Hello @oayres
Hope you are well.
I have a react project that needs to be sever-side rendering or pre-rendering.
I'd like to change the <title></title> and <meta name="description> dynamically according to the route.
I am using Redux.
Well, is it possible to change the title and meta tags dynamically if I install this package?
TBH, I've attempted several server-side rendering/pre-rendering libraries and still rendering static meta tags.
Many thanks.
The text was updated successfully, but these errors were encountered: