react-helmet-async icon indicating copy to clipboard operation
react-helmet-async copied to clipboard

Server side not get data dynamic sync with helmet client

Open hieusmiths opened this issue 5 years ago • 0 comments

Maybe i failed, thank so much suporter. 1.Client component

 <MetaTag title={dataDetail.name} desc={dataDetail.description} />

2.Server

 <HelmetProvider context={helmetContext}>
    <StaticRouter location={req.url} context={context}>
      <Provider store={store}>
        <App />
      </Provider>
    </StaticRouter>
  </HelmetProvider>

Then i code like below. const { helmet } = helmetContext => using it for replace like document.

Then i view source and receive code default meta tags, me set default props of MetaTag component.

Thanks.

hieusmiths avatar Mar 18 '20 10:03 hieusmiths