Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning 'UNSAFE_componentWillMount', How to fix the problem? #694

Open
hozaifa4you opened this issue Nov 17, 2022 · 4 comments
Open

Warning 'UNSAFE_componentWillMount', How to fix the problem? #694

hozaifa4you opened this issue Nov 17, 2022 · 4 comments

Comments

@hozaifa4you
Copy link

Helmet Error 1
Helmet Error 2

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)`

@hozaifa4you
Copy link
Author

How to fix the warning without removing <React.StrictMode>??

@PunkFleet
Copy link

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?

@sebastiangraz
Copy link

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)

@mcrisostomo
Copy link

Duplicate from #548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants