manuelbieh / react-ssr-setup

React Starter Project with Webpack 4, Babel 7, TypeScript, CSS Modules, Server Side Rendering, i18n and some more niceties

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrade to React Helmet 6 once it is released to avoid maximum call stack error

manuelbieh opened this issue · comments

When using this:

<Helmet
    defaultTitle="React SSR Starter – TypeScript Edition"
    titleTemplate="%s – React SSR Starter – TypeScript Edition"
>
    <link rel="icon" type="image/png" href={favicon} sizes="16x16" />
</Helmet>

This error occurs after a (short) while: nfl/react-helmet#373

Temporary workaround is to use the following until Helmet@6.0.0 stable is released:

<Helmet
    defaultTitle="React SSR Starter – TypeScript Edition"
    titleTemplate="%s – React SSR Starter – TypeScript Edition"
    link={[{ rel: 'icon', type: 'image/png', href: favicon }]}
/>

Yeah man, it took me like 4 hours to find the fact that this is the issue after implementing hooks.

I converted the place where I add Helmet to a Class component for now to fix it! Hope they do an official release of version 6 soon.