The SEO tags don’t get rendered in SSR when using the next-seo
package.
I have tried
<NextSeo />
and
<Head><NextSeo /></Head>
to render code in a next.js
page, but no luck.
Can anyone have any workaround solutions by using next-seo
with SSR?
Thanks.
2
Answers
I've just found that the reason is
<PersistGate loading={null} persistor={persistor}></PersistGate>
. Because I am using redux and persist-redux in react.If I take out the
<PersistGate>
line, the meta tags are fine._app.js:
What is the problem there? I must use redux+persist-redux....
In my case works only like this: