Closed karlmacklin closed 6 years ago
I solved this by making sure my server rendered tags all included the data-rdm
attribute. Good enough for my use case.
You are right - we use data-rdm
to ensure we don't clear other meta tags. If you used the SSR example and included DocumentMeta in your server side rendering, it would automatically add data-rdm
to the tags inserted on the server.
I'm not sure if I'm missing something obvious here, but:
My use case is a SPA where the first rendered html from the server already contains things like title, description, canonical etc. When my DocumentMeta enabled React app then is rendered on top, I end up with duplicate tags for all these.
Is there a way for DocumentMeta to 'hook on' to the existing tags on use those instead? I am using react-router so when navigating the site, the second set (the duplicates) are updated correctly.
I am not using any React server side rendering. It is not an option currently (due to SEO reasons) to not have the server render these tags.