ethanselzer / react-cursor-position

A React component that decorates its children with mouse and touch coordinates relative to itself.
https://ethanselzer.github.io/react-cursor-position
MIT License
143 stars 35 forks source link

Replace unsafe lifecycle #32

Open dan-lee opened 4 years ago

dan-lee commented 4 years ago

This is to fix the following warning and to be compatible with concurrent mode:

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

It shouldn't affect the functionality, but I didn't test it. I converted some other components in the similar manner and it always worked out.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 746df2ba15a3d6cc27f0fbdd4e6e20c9e01e9bb9 on dan-lee:patch-1 into 0f594bb6f08e774c68ef131d883ece1a55823ad0 on ethanselzer:master.

dan-lee commented 4 years ago

@ethanselzer Any chance getting this in soon? ✌️

geoguide commented 3 years ago

Can we get this merged and released? It's been ready for over a year.

dan-lee commented 3 years ago

@geoguide Btw. there's always the option to use patch-package, which is my go-to tool to deal with situations like this.