We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have to listen the container's rect changed, and get the hover state. I get this code:
const [ref, rect] = useMeasure(); const isHovering = useHoverDirty(ref); // No
How to get the ref by useMeasure and transit it into useHoverDirty?
The text was updated successfully, but these errors were encountered:
import useRef from 'react'; import useMeasure from 'react-use'; import useHoverDirty from 'react-use-gesture';
function YourComponent() { const [ref, rect] = useMeasure(); const hoverRef = useRef(); //Here create a ref for UseHoverDirty
// Attach the ref to the DOM element obtained from useMeasure hoverRef.current = ref.current;
// Now, you can use the hoverRef for the UseHoverDirty hook const isHovering = useHoverDirty(hoverRef);
Sorry, something went wrong.
No branches or pull requests
I have to listen the container's rect changed, and get the hover state. I get this code:
How to get the ref by useMeasure and transit it into useHoverDirty?
The text was updated successfully, but these errors were encountered: