render() { const { component, store } = this.props const head = Helmet.rewind() const htmlAttributes = head.htmlAttributes.toComponent() return ( <html lang={htmlAttributes.lang}> <head> <meta charSet="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="shortcut icon" href="/favicon.ico" /> {head.title.toComponent()} {head.meta.toComponent()} {head.link.toComponent()} {head.script.toComponent()} {this.styles} </head> <body> <div id="root" dangerouslySetInnerHTML={{ __html: renderToString(component) }} /> <script dangerouslySetInnerHTML={{ __html: `window.__PRELOADED_STATE__=${serialize(store.getState())};` }} /> {this.scripts} </body> </html> ) }
const Html = ({ store, htmlContent }: Props): Element<'html'> => { const attrs = head.htmlAttributes.toComponent(); const { lang, ...rest } = attrs || {}; const assets = webpackIsomorphicTools.assets(); <link rel="shortcut icon" href="/favicon.ico" /> {head.title.toComponent()} {head.base.toComponent()} {head.meta.toComponent()} {head.link.toComponent()} {head.script.toComponent()} </body> </html>
const attrs = head.htmlAttributes.toComponent(); <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> {head.base.toComponent()} {head.title.toComponent()} {head.meta.toComponent()} {head.link.toComponent()} )} {head.script.toComponent()} </body> </html>