useMouseWheelReact Hook to get deltaY of mouse scrolled in window.
import { useMouseWheel } from 'react-use';
const Demo = () => {
const mouseWheel = useMouseWheel()
return (
<>
<h3>delta Y Scrolled: {mouseWheel}</h3>
</>
);
};
// TODO: implement useMouseWheel function notImplemented(..._args: any[]): any { throw new Error('Not implemented'); } export default notImplemented; export const useMouseWheel = notImplemented;
Tests