nkbt / react-height

Component-wrapper to determine and report children elements height
MIT License
180 stars 27 forks source link

Fix componentWIllReceiveProps warning #41

Open dimaip opened 4 years ago

dimaip commented 4 years ago

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.

nkbt commented 4 years ago

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.

dimaip commented 4 years ago

@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.

nkbt commented 4 years ago

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

Cheers, and happy new 2020 from Sydney 🎉

dimaip commented 4 years ago

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

rogerfar commented 3 years ago

@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.

nkbt commented 3 years ago

Surely

vtrphan commented 2 years ago

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