-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
A simple hook to get position of a element
function App() {
let ref = useRef(null);
let { left, top } = usePosition(ref);
return (
<p ref={ref}>Hello Hooks: {JSON.stringify({left, top})}</p>
);
}
here my repo: https://github.com/tranbathanhtung/usePosition
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels