useElementSize ​
elements
test coverage
Last changed: 24 days ago
Hook that observes and returns the width and height of element
typescript
import { useElementSize } from '@siberiacancode/reactuse';
Usage ​
typescript
const { value } = useElementSize(ref);
// or
const { ref, value } = useElementSize();