Stop using `UNSAFE_componentWillMount`
**Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** get this warning in console when using Helmet: ``` Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-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) ``` **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:** just include a `<Helmet>` anywhere in a rendered component in your app. 1) create typescript create-react-app ```sh npx create-react-app test --template typescript && \ cd test && \ npm i --save react-helmet && \ npm i --save-dev @types/react-helmet ``` 2) add the following in `App.tsx`: ```tsx <Helmet> <title>test</title> </Helmet> ``` 3) `npm start` **What is the expected behavior?** Don't use depreciated react APIs in libraries. Should not get this warning. **Which versions of React and react-helmet, and which browser / OS are affected by this issue? Did this wor
Posted by chadlavi on May 2, 2020, 5:15 PM
Tags
Related issues
- 2026 - Microsoft Office 365
- [Ubuntu] `ubuntu-latest` label will use Ubuntu 26.04 in November 2026
- Gamut mapping
- [Codex Desktop] Editing and resending a queued message triggers "App-server queued follow-up no longer exists"
- [Windows] ChatGPT 26.820.60940 fails with "invalid transport in mcp_servers.codex_app"; Beta 26.727.40816 works
- [BUG]: infinite loading of videos
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
github (SaaS)
2026 - Microsoft Office 365
[Ubuntu] `ubuntu-latest` label will use Ubuntu 26.04 in November 2026
Gamut mapping
[Codex Desktop] Editing and resending a queued message triggers "App-server queued follow-up no longer exists"
[Windows] ChatGPT 26.820.60940 fails with "invalid transport in mcp_servers.codex_app"; Beta 26.727.40816 works
[BUG]: infinite loading of videos
Restore GPT-5.6 Sol’s 372k Codex context window, or provide an opt-in setting
Codex Desktop for macOS repeatedly triggers `syspolicyd` / `trustd` CPU and memory runaway
Stop using `UNSAFE_componentWillMount`
**Do you want to request a *feature* or report a *bug*?** Bug **What is the current behavior?** get this warning in console when using Helmet: ``` Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-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) ``` **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:** just include a `<Helmet>` anywhere in a rendered component in your app. 1) create typescript create-react-app ```sh npx create-react-app test --template typescript && \ cd test && \ npm i --save react-helmet && \ npm i --save-dev @types/react-helmet ``` 2) add the following in `App.tsx`: ```tsx <Helmet> <title>test</title> </Helmet> ``` 3) `npm start` **What is the expected behavior?** Don't use depreciated react APIs in libraries. Should not get this warning. **Which versions of React and react-helmet, and which browser / OS are affected by this issue? Did this wor
Comments (0)
No comments yet. Start the discussion.