Warning 'UNSAFE_componentWillMount', How to fix the problem?

Warning facing whine I am using react-helmet.
Warnings -> `Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
- Move code with side effects to componentDidMount, and set initial state in the constructor.
Please update the following components: SideEffect(NullComponent)`
How to fix the warning without removing <React.StrictMode>??
I had the same problem, and since I needed to reference the script script in the component, I had a hard time deciding. REACT-HELMET still being updated by anyone else?
Do not use this package if you use a relatively modern react version (16+). Use react-helmet-async instead.
No other solution afaik unless you are fine with not using strict mode (you should)
Duplicate from #548