I was using the
react-helmet package, and noticed an error in my console saying:
Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
Turns out, in the next version of React 17 (the next version of React), the
componentWillMount method will no longer work.
react-helmet relies on this method, and therefore there's a warning when you try to use
componentWillMount in React 16.9+.
Theres an open issue on GitHub for fixing this, but it doesn't look like the NFL (which made
react-helmet) is actively maintaining the package.
There's a virtually identical package called
react-helmet-async, which doesn't have this error and will continue working through React 17. Replacing
react-helmet-async everywhere in my code got rid of the warning for me.