How to use @rooks/use-boundingclientrect - 1 common examples

To help you get started, we’ve selected a few @rooks/use-boundingclientrect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imbhargav5 / rooks / packages / storybook / src / boundingclientrect.js View on Github external
function BoundingClientRectDemo() {
  const myRef = useRef();
  const getBoundingClientRect = useBoundingclientrect(myRef);
  const [XOffset, setXOffset] = useState(0);
  const [YOffset, setYOffset] = useState(300);
  const displayString = JSON.stringify(getBoundingClientRect, null, 2);
  return (
    <>
      <div style="{{"></div>

@rooks/use-boundingclientrect

A React Hooks package for boundingclientrect

MIT
Latest version published 3 years ago

Package Health Score

59 / 100
Full package analysis

Popular @rooks/use-boundingclientrect functions