Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 278 Bytes

useMouseWheel.md

File metadata and controls

17 lines (14 loc) · 278 Bytes

useMouseWheel

React Hook to get deltaY of mouse scrolled in window.

Usage

import { useMouseWheel } from 'react-use';

const Demo = () => {
  const mouseWheel = useMouseWheel()
  return (
    <>
      <h3>delta Y Scrolled: {mouseWheel}</h3>
    </>
  );
};