Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 339 Bytes

File metadata and controls

22 lines (16 loc) · 339 Bytes

useResizeObserver

Reports changes to the dimensions of an Element's content or border box.

Usage

<script setup>
import { ref } from 'vue'
import { useResizeObserver } from 'vue-observer-hooks'

const el = ref(null)

useResizeObserver(el, (entry) => {
  // todo...
})
</script>

<template>
  <div ref="el" />
</template>