frontend-opensource-project / use-react-hooks

React hoooooooks๐Ÿ˜Ž
https://frontend-opensource-project.github.io/use-react-hooks/
5 stars 0 forks source link

[URH-25] useMousePosition ์‹ ๊ทœ #24

Closed foresec closed 3 months ago

foresec commented 3 months ago

๐Ÿ‘พ Pull Request

1๏ธโƒฃ Spec

2๏ธโƒฃ ๋ณ€๊ฒฝ ์‚ฌํ•ญ

3๏ธโƒฃ ์˜ˆ์‹œ ์ฝ”๋“œ

1. MouseEvent ๊ธฐ๋ณธ ์†์„ฑ

  const { viewX, viewY, pageX, pageY, screenX, screenY } = useMousePosition();

3. ์ด๋ฒคํŠธํ•ธ๋“ค๋ง ๋นˆ๋„ ๋ฐ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์˜ต์…˜

  const { viewX, ...} = useMousePosition({delayTime : 100});
  const { viewX, ...} = useMousePosition({animationMode: true});

4๏ธโƒฃ ๊ด€๋ จ ๋ฌธ์„œ (์„ ํƒ ์‚ฌํ•ญ)