Razzle: Add React-helmet-async example

Created on 8 Feb 2018  路  7Comments  路  Source: jaredpalmer/razzle

Most helpful comment

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

All 7 comments

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.

@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?

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).

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! 馃槃

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.

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

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ewolfe picture ewolfe  路  4Comments

mhuggins picture mhuggins  路  3Comments

MaxGoh picture MaxGoh  路  4Comments

alexjoyner picture alexjoyner  路  3Comments

Jayphen picture Jayphen  路  4Comments