react-height icon indicating copy to clipboard operation
react-height copied to clipboard

Fix componentWIllReceiveProps warning

Open dimaip opened this issue 5 years ago • 7 comments

Currently this package triggers React's warnings:

image

At the very least we can rename this method to UNSAFE_componentWIllReceiveProps or better yet fix it properly.

dimaip avatar Dec 27 '19 07:12 dimaip

If you are using react-height directly - yeah, it is the case. If as part of react-collapse - then I suggest upgrading react-collapse, latest version does not depend on react-height and react-motion.

nkbt avatar Dec 30 '19 23:12 nkbt

@nkbt thanks for the pointer, I'm indeed using older version of react-collapse because of some issues with the newer version. Perhaps I will just re-write this component myself for my project.

dimaip avatar Dec 31 '19 11:12 dimaip

Sure, no worries. It’s not that easy though. Look through the source for some ideas.

Cheers, and happy new 2020 from Sydney 🎉

nkbt avatar Dec 31 '19 13:12 nkbt

Thanks, I surely will! Happy new year from Moscow!

dimaip avatar Dec 31 '19 14:12 dimaip

@nkbt are you open for a small PR to rename this to UNSAFE_componentWillReceiveProps? I know 18 isn't around the corner just yet, but at least it will get rid of the pesky warning.

rogerfar avatar May 28 '21 19:05 rogerfar

Surely

nkbt avatar May 29 '21 00:05 nkbt

what is the status of this PR? i think React 18 will come soon

vtrphan avatar Feb 01 '22 15:02 vtrphan