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

Do not declare isReactComponent #25

Closed jacekradko closed 6 years ago

jacekradko commented 6 years ago

With the React 16.5.0 release, this component's use of isReactComponent breaks React's shouldConstruct check. Here is a more detailed explanation of the problem: https://github.com/facebook/react/issues/13580

Here is a working demo of the bug: https://codesandbox.io/s/nm1nn0374

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 5bf110c7039ebbad89f842fca12cabd3a9d15bc2 on jacekradko:master into 855b112654ce195196afc065a4e32951b38494fc on ethanselzer:master.

ethanselzer commented 6 years ago

Hi @jacekradko - Thanks for identifying this issue and providing a fix. You are awesome! I made a comment on the code. Please have a look and let me know your thoughts. Thanks!

jacekradko commented 6 years ago

@ethanselzer I made the changes as you suggested.

Same in react-hover-observer