1
I have updated my React project from version 0.57.8 to the latest version and am receiving the following warning message:
Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
I entered this link that appears Update on Async Rendering
I executed the recommended command in the tutorial:
cd your_project
npx react-codemod rename-unsafe-lifecycles
In the tutorial according to what I read, it seems that this command is to update the functions componentWillMount, componentWillUpdate, etc. But I still get the same warning message.
Can someone help me fix this?
The methods
componentWillMount
were renamed tocomponentDidMount
?– Felipe Avelar
In my case, the problem was happen because I’m trying to load a qr code Inside the Storybook. So, I created a Boolean state to identify when the scenario is a SB and apply a fake qr code (a generated image) and when it’s in Production, the real qr code will be called. Works Great for me. *** In my case, the problem happened because I’m trying to load a qr code into Storybook. Then, I created a Boolean state to identify when the scenario is a SB and apply a false qr code (a generated image) and when it is in production, the actual qr code will be called. Works great for
– Neevs