Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with React 16 #31

Open
davidhatten opened this issue Aug 5, 2019 · 3 comments
Open

Compatibility with React 16 #31

davidhatten opened this issue Aug 5, 2019 · 3 comments

Comments

@davidhatten
Copy link

One of the minor versions of React 16 (I think, 16.2?) changed the typeof response from function to object. This causes the method getIsReactComponent(reactElement) to return false, thereby causing the intended wrapped element to not have the position properties not added to its props.

@carpiediem
Copy link

@davidhatten are you aware of any way to avoid this issue, until this library gets updated? Or do I need to (a) hold off on updating react or (b) find an alternative to react-cursor-position?

@davidhatten
Copy link
Author

@carpiediem I yanked it out of my project for the time being and manually implemented the functionality I needed. Not sure what you're doing, but I grabbed the x and y position from the event and then had to do some SVG handling.

https://github.com/davidhatten/geometric-drawer/blob/master/webpack/containers/Canvas.js#L23

@carpiediem
Copy link

Got it, thanks. Not too hard for position

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants