react-helmet: Throws warnings in React 16.9 and will not work with React 17
Do you want to request a feature or report a bug? Bug
What is the current behavior? Throws warnings with React 16.9+ and will not work with React 17.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn’t have dependencies other than React and react-helmet. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
What is the expected behavior? No warnings and should work.
Which versions of React and react-helmet, and which browser / OS are affected by this issue? Did this work in previous versions of React and/or react-helmet? React 16.9+, any version of react-helmet, any browser/os.
Here is the warning thrown now:
Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
- Move code with side effects to componentDidMount, and set initial state in the constructor.
- Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run
npx react-codemod rename-unsafe-lifecyclesin your project source folder.
Please update the following components: SideEffect(DocumentTitle)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 69
- Comments: 25 (1 by maintainers)
Commits related to this issue
- Switch from react-helmet to react-helmet-async Fixes a console error by implicitly removing the dependency on react-side-effect (see nfl/react-helmet#465). — committed to wlach/iodide by wlach 5 years ago
- Switch from react-helmet to react-helmet-async (#2315) Fixes a console error by implicitly removing the dependency on react-side-effect (see nfl/react-helmet#465). — committed to iodide-project/iodide by wlach 5 years ago
- feat: replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits recentl... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- chore: react-helmet => react-helmet-async fix SideEffect(NullComponent) warning https://github.com/readium/readium-desktop/issues/596 https://github.com/nfl/react-helmet/issues/465 https://github.co... — committed to ant-design/ant-design by afc163 5 years ago
- chore: react-helmet => react-helmet-async fix SideEffect(NullComponent) warning https://github.com/readium/readium-desktop/issues/596 https://github.com/nfl/react-helmet/issues/465 https://github.co... — committed to ant-design/ant-design by afc163 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
- feat(react): replace react-helmet with react-helmet-async The https://github.com/nfl/react-helmet repository seems fairly dead, there are a lot of open issues and PRs and not many releases / commits ... — committed to untool/untool by ZauberNerd 5 years ago
Thanks for everyone’s patience. We are actively working on 6.0.0 release. 6.0.0-beta.2 is available and will work with the latest React version. We’ll also be looking to see how this library can work with React 17.
The problem is still present in react-helmet@6.1.0.
Still same problem on React 17…
Still valid actually, react-helmet also depends on react-side-effect. Looks like we need to wait for them to update.
so TL;DR migrate to react-helmet-async?
I also installed today and am getting the same warning
Installed today and getting same warning
Will this issue be fixed in this package? (Asking, not expecting. Great respect for all who maintain this.)
It’s got quite a large usage base that it would be great if that would be possible instead of migration to another option.
Ran into the same this morning with the package.
FYI this comment on the issue logged on react-side-effect: https://github.com/gaearon/react-side-effect/issues/54#issuecomment-520056590
Suggestion there is to migrate away from that package.
@garethtalty I ended up switching to react-helmet-async
It’s been 2+ years so I don’t remember, but hopefully not remembering is a good sign. lol
I ended-up using react-helmet-async instead, mainly for server side rendering purposes.