#usePosition

Have the position always the specified element to be updated.



#Usage

import { usePosition } from '@hitechline/reactools';

const Component = () => {
  const { ref, ...position } = usePosition();

  return (
    <div ref={ref}>
      My position is <span>{JSON.stringify(position)}</span>
    </div>
  );
};