Skip to content
New issue

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

Add React-helmet-async example #483

Closed
jaredpalmer opened this issue Feb 8, 2018 · 7 comments
Closed

Add React-helmet-async example #483

jaredpalmer opened this issue Feb 8, 2018 · 7 comments

Comments

@jaredpalmer
Copy link
Owner

No description provided.

@stale
Copy link

stale bot commented Aug 15, 2018

Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.

@stale stale bot added the stale label Aug 15, 2018
@DevanB
Copy link

DevanB commented Aug 20, 2018

@jaredpalmer Not sure this would be solved by async/suspense (because I'm still having issues wrapping my head around Suspense in general 😞 ), but I have noticed something in my site (in production).

I'm setting the <title> in the server.js, and using react-helmet on a per-page basis to change that title and description. When I navigate away from the home page, via a nav link, then press Back in the browser the title tag is not reverting to the home page's titles. I believe this is because the home page doesn't have react-helmet set meta-data, and I'm incorrectly assuming that it should default back to the server.js included tags when no tags are set within the component.

Is this a correct assumption? Does an async example solve this in any way?

@stale stale bot removed the stale label Aug 20, 2018
@jaredpalmer
Copy link
Owner Author

You are correct. Suspense SSR isn't done yet, but it could solve problems like this. Furthermore, title tags really only matter for SEO (so first render only).

@DevanB
Copy link

DevanB commented Aug 20, 2018

Ahh, great to know. I'm being told by our SEO/analytics person that title tags matter on each page since the crawler would be crawling each page and expecting a different title per page (same with description, canonical links, and hreflang tags, apparently).

Thanks for the information! 😄

@snow-summer
Copy link

Titles matter for more than SEO :) Not only for UX/UI but if a visitor bookmarks a page they will expect the title to be correct for the page they are bookmarking.

@greatwitenorth
Copy link

Saw this was closed and was just wondering what the possibility was of seeing an example of React-helmet-async and razzle working together?

@lucasreppewelander
Copy link

as regular react-helmet doesn't work if you use renderToNodeStream I found an issue about it at react-helmet but I found that the example with renderToNodeStream on react-helmet-async is too opinionated against apollo..

anyone with more experience in this that could assist how to pipe in the data from the stream?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants