nextjs-react-router
nextjs-react-router copied to clipboard
Incompatible with NextSEO and next/head
If you try to add metatags to the server side rendered pages it does not show up in page source and will not get picked up by any social media crawlers. It seems to be because of the null
in this line:
{typeof window === 'undefined' ? null : <Component {...pageProps} />}
But I don't know if there is any way around this because that window
check is required.
If you want to modify the head for all pages you can use next-seo
and include a default next-seo.config.ts file see code sandbox here:
https://codesandbox.io/s/tiess?file=/next-seo.config.ts.
but you still can't change the metatags for a single SSR'd page (such as settings.ts in the example)