react-cursor-position icon indicating copy to clipboard operation
react-cursor-position copied to clipboard

Warning: ComponentWillReceiveProps has been renamed

Open shtbik opened this issue 4 years ago • 2 comments

react: 16.9.13

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. 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
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps 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: ReactCursorPosition

shtbik avatar Dec 02 '19 17:12 shtbik

Any plans to address this? I am actively using this library, it works great, but have recently updated to react 16, so am getting these warnings. Looks like there is a pull request from dan-lee which patches this. (I tried having npm fetch from that branch, but doesn't seem to have a prepare script, so doesn't work directly).

I have worked around this problem by making a release of dan-lee's version onto npmjs called "kevinseghetti-react-cursor-position": "^3.0.3",

KevinSeghetti avatar Jan 29 '20 16:01 KevinSeghetti

Any plans to address this? I am actively using this library, it works great, but have recently updated to react 16, so am getting these warnings.

Looks like there is a pull request from dan-lee which patches this. (I tried having npm fetch from that branch, but doesn't seem to have a prepare script, so doesn't work directly). I have worked around this problem by making a release of dan-lee's version onto npmjs called "kevinseghetti-react-cursor-position": "^3.0.3",

thank you work using kevinseghetti-react-cursor-position

redheet avatar Oct 09 '22 01:10 redheet