React-helmet: React-helmet not working with latest react version along with react hooks.

Created on 4 Apr 2020  路  3Comments  路  Source: nfl/react-helmet

I am getting below error when I use the latest react version along with react Helmet. I am using hooks and trying to use a Helmet as documented. This issue comes only when we build the project but when I run locally Helmet works perfectly fine with React hooks.

Below is the link of error which I am getting in the console:

https://reactjs.org/docs/error-decoder.html/?invariant=321

Request your help to know what can be the possible solution.

Most helpful comment

Apologies, we need to update the documentation. With 6.0.0 you can import {Helmet} from "react-helmet" now.

All 3 comments

I am seeing something similar

react-scripts build
Creating an optimized production build...
Failed to compile.

./src/pages/Home.tsx
Attempted import error: 'react-helmet' does not contain a default export (imported as 'Helmet').


[ERROR] An error occurred while running subprocess react-scripts.

        react-scripts build exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information

Apologies, we need to update the documentation. With 6.0.0 you can import {Helmet} from "react-helmet" now.

Ah awesome,

Good thing we caught it during a ci
Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattecapu picture mattecapu  路  4Comments

lyquocnam picture lyquocnam  路  3Comments

tiagonapoli picture tiagonapoli  路  3Comments

bassarisse picture bassarisse  路  3Comments

RichardJECooke picture RichardJECooke  路  4Comments