unclecheese / react-selectable

A component for react that allows mouse selection of child items
MIT License
142 stars 72 forks source link

React legacy lifecycle method deprecation #58

Open linuswillner opened 5 years ago

linuswillner commented 5 years ago

React recently moved forward with its intent to deprecate and eventually remove unsafe lifecycle methods. This includes componentWillReceiveProps, which this component utilises. As such, usage of this component now triggers a warning in React:

Warning

React has some migration directives here: https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props

unclecheese commented 5 years ago

Cheers. The whole library should be moved to use hooks, tbh. It's perfectly suited for them.

edant92 commented 5 years ago

Any timeline on when this might be resolved? Or anything I could do to help out?

unclecheese commented 5 years ago

If you submit a PR with the changes, I'll gladly give it a prompt review and merge. :)