UNSAFE_componentWillReceiveProps issue
index.js:1 Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
- Move data fetching code or side effects to componentDidUpdate.
- If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
Please update the following components: AwesomeSlider
im also having this problem when using <img src='/path/to/source' />.
However, I when I used <div data-src='/path/to/source' /> as recommended by the docs, it worked.
This is also happening to me, even using div data-src='/path/to/source' />
any updates ? bug is still there
im having the same bug , any updates?
I am also having the same bug. Hopefully this issue will be noticed.
componentWillReceiveProps was renamed to componentDidUpdate. It is recommended to update this but seem that this package did not. One way around it is using the UNSAFE prefix as you have there but the error you getting is just telling you to be careful because that's not the way to resolve this issue. Updating this package is.
Same issue here
<AwesomeSlider key={`crs-container-${props.name}`} animation="cubeAnimation">
{props.urls &&
props.urls.map((url, idx) => {
return (
<div
data-src={url}
key={`crs-img-${props.name}-${idx}`}
style={{ maxWidth: '100%', maxHeight: '100%' }}
/>
);
})}
</AwesomeSlider>
The error:
react-dom.development.js:86 Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
Please update the following components: AwesomeSlider