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

componentWillMount warning from SideEffect(NullComponent) #3893

Closed
1 task
dr3 opened this issue Sep 20, 2019 · 21 comments · Fixed by #6187
Closed
1 task

componentWillMount warning from SideEffect(NullComponent) #3893

dr3 opened this issue Sep 20, 2019 · 21 comments · Fixed by #6187
Labels
bug Something isn't working ws-articles Tasks for the WS Articles Team ws-media World Service Media
Projects

Comments

@dr3
Copy link
Contributor

dr3 commented Sep 20, 2019

Describe the bug
in npm run test:unit we get the following warning. I belive this is similar BUT UNRELATED to react-loadable, which is covered by #3087

To Reproduce
Steps to reproduce the behavior:

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-lifecycles` in your project source folder.

      Please update the following components: SideEffect(NullComponent)

Fix:
If issue is in our code, fix it. If its in a dependancy, log the issue in their github and link to it here

Expected behavior
Warning doesnt happen

Testing notes

  • This bug fix is expected to need manual testing.

Additional context
Add any other context about the problem here.

@dr3 dr3 added bug Something isn't working simorgh-core-stream labels Sep 20, 2019
@dr3 dr3 added this to To do in Simorgh via automation Sep 20, 2019
@dr3
Copy link
Contributor Author

dr3 commented Sep 23, 2019

I believe this is from helmet

Related issues:
nfl/react-helmet#465
nfl/react-helmet#413

@amywalkerdev amywalkerdev moved this from To do to Ready for dev in Simorgh Oct 28, 2019
@FK78 FK78 added the external blocked Blocked by an external dependency label Oct 31, 2019
@FK78 FK78 moved this from Ready for dev to Blocked (by something outside pod) in Simorgh Oct 31, 2019
@FK78
Copy link
Contributor

FK78 commented Oct 31, 2019

Blocked until react-helmet bumps react-side-effect to 2.0.0.

@FK78 FK78 added ws-home ws-media World Service Media ws-articles Tasks for the WS Articles Team and removed simorgh-core-stream labels Jan 23, 2020
@j-pendlebury
Copy link
Contributor

Blocked until react-helmet bumps react-side-effect to 2.0.0.

Looks like that's been done https://github.com/nfl/react-helmet/blob/master/package.json#L38

@FK78
Copy link
Contributor

FK78 commented Feb 10, 2020

Blocked until react-helmet bumps react-side-effect to 2.0.0.

Looks like that's been done https://github.com/nfl/react-helmet/blob/master/package.json#L38

Oh great, but currently seems to be in beta so we won't be able to unblock this issue for now.

@Roeefl
Copy link

Roeefl commented Feb 13, 2020

++ Waiting for this patch to be available as well

@FK78
Copy link
Contributor

FK78 commented Apr 14, 2020

Blocked until react-helmet bumps react-side-effect to 2.0.0.

Looks like that's been done https://github.com/nfl/react-helmet/blob/master/package.json#L38

Oh great, but currently seems to be in beta so we won't be able to unblock this issue for now.

6.0.0 has been released.

@FK78 FK78 removed the external blocked Blocked by an external dependency label Apr 14, 2020
@FK78 FK78 moved this from Blocked (by something outside pod) to Ready for dev in Simorgh Apr 14, 2020
@EinsteinNjoroge EinsteinNjoroge self-assigned this Apr 14, 2020
@EinsteinNjoroge EinsteinNjoroge moved this from Ready for dev to Issue in Progress in Simorgh Apr 14, 2020
This was referenced Apr 15, 2020
Simorgh automation moved this from Issue in Progress to Done Apr 17, 2020
@darrenkeen
Copy link

Anyone else still getting this issue with 6.0.0-beta?

@FK78
Copy link
Contributor

FK78 commented Apr 21, 2020

Anyone else still getting this issue with 6.0.0-beta?

We've manged to fix the warnings by using version 6.0.0, we did not test 6.0.0-beta.

@rinturj84
Copy link

Still getting the Warning in 6.0.0.

@darrenkeen
Copy link

Yes me too, still in 6.0.0

@MickaelNeves
Copy link

fixed in ^6.1.0

@RyanRutkin
Copy link

I'm still getting this error in ^6.1.0

@zachintosh
Copy link

Also seeing this error in 6.1.0

@bobziroll
Copy link

bobziroll commented Dec 14, 2020

Same here. Just updated from 5.2.1 to 6.1.0 and getting the same warning.

@miquelvir
Copy link

Same here. Seeing the warning in "react-helmet": "^6.1.0".

Warning: 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)
console.<computed> @ index.js:1
printWarning @ react-dom.development.js:67
error @ react-dom.development.js:43
push../node_modules/react-dom/cjs/react-dom.development.js.ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings @ react-dom.development.js:11506
flushRenderPhaseStrictModeWarningsInDEV @ react-dom.development.js:23822
commitRootImpl @ react-dom.development.js:23005
unstable_runWithPriority @ scheduler.development.js:646
runWithPriority$1 @ react-dom.development.js:11276
commitRoot @ react-dom.development.js:22990
performSyncWorkOnRoot @ react-dom.development.js:22329
scheduleUpdateOnFiber @ react-dom.development.js:21881
updateContainer @ react-dom.development.js:25482
(anonymous) @ react-dom.development.js:26021
unbatchedUpdates @ react-dom.development.js:22431
legacyRenderSubtreeIntoContainer @ react-dom.development.js:26020
render @ react-dom.development.js:26103
(anonymous) @ index.js:9
./src/index.js @ index.js:35
__webpack_require__ @ bootstrap:856
fn @ bootstrap:150
1 @ theme.js:31
__webpack_require__ @ bootstrap:856
checkDeferredModules @ bootstrap:45
webpackJsonpCallback @ bootstrap:32
(anonymous) @ main.chunk.js:1

@satyamskillz
Copy link

I am still getting the same error, so I am uninstalling this useless package. Total waste of time!!

@ananddoesembed
Copy link

Issue persists. is this problem going to get fixed?

holly-cummins added a commit to holly-cummins/gatsby-platform that referenced this issue Mar 30, 2022
holly-cummins added a commit to holly-cummins/holly-cummins.github.io that referenced this issue Mar 30, 2022
@samuelbukoye
Copy link

im still getting this issue in version ^6.1.0"

@Darkthunder119
Copy link

Still have the issues. I have decided to use react-helmet-async instead. Does a much better job and does not use SideEffect

@hector97i
Copy link

@Darkthunder119

Still have the issues. I have decided to use react-helmet-async instead. Does a much better job and does not use SideEffect

How did that go for you?

@Pilzington
Copy link

@Darkthunder119

Still have the issues. I have decided to use react-helmet-async instead. Does a much better job and does not use SideEffect

How did that go for you?

Switching to react-helmet-async worked for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ws-articles Tasks for the WS Articles Team ws-media World Service Media
Projects
No open projects
Development

Successfully merging a pull request may close this issue.