Typescript types out of sync
The types of react-helmet have been updated and now there is no default export anymore. Check out this PR:
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/38557/files
The PR updates also the @types/react-helmet-async package. But as it turns out, react-helmet-async includes its own types, which relies on the old version of react-helmet. (It imports the default export.) Therefore in the code an error is shown as JSX element type 'Helmet' does not have any construct or call signatures..
Why is there a d.ts file in this repo and in DefinitelyTyped? Should I file a PR for this repo?
The fix is to change
import Helmet, { HelmetData } from 'react-helmet';
to
import { Helmet, HelmetData } from 'react-helmet';
Would be great if this could be patched in this repo.
I've commented on the PR, but will start the convo here.
When we came up with this issue we simply ran npm update.
My bad was, that I've overlooked that fakt that we had @types for react-helmet as well as react-helmet-async in our package.json. Simply, because the codebase is so huge – Sorry!
After removing both @types everything compiled perfectly again.
Don't have the time to see if some dependencies have bin pinned or anything. Any ideas?
I have the same issue using "react-helmet-async": "^1.0.3" and @types/react-helmet-async": "^0.0.3".
I'm getting this error : JSX element type 'Helmet' does not have any construct or call signatures.ts(2604)
I'm using yarn BTW
should be sorted after #83 & #95
https://www.npmjs.com/package/react-helmet-async/v/1.0.6