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

useMouse and useMouseHovered type definitions don't accept SVGElements #465

Closed
thevtm opened this issue Jul 16, 2019 · 1 comment · Fixed by #479
Closed

useMouse and useMouseHovered type definitions don't accept SVGElements #465

thevtm opened this issue Jul 16, 2019 · 1 comment · Fixed by #479
Labels
bug Something isn't working released

Comments

@thevtm
Copy link
Contributor

thevtm commented Jul 16, 2019

I'm trying to useMouse hook for an SVG element.

It works just fine but TS complains about it.

const mouse = useMouse(svgRef)

Results in this error

Argument of type 'RefObject<SVGElement>' is not assignable to parameter of type 'RefObject<HTMLElement>'.
  Type 'SVGElement' is missing the following properties from type 'HTMLElement': accessKey, accessKeyLabel, autocapitalize, dir, and 16 more.

Version: 9.11.1

@streamich
Copy link
Owner

🎉 This issue has been resolved in version 10.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants