import { onBeforeUnmount } from "vue";
import autosize from 'autosize';

export function useAutosize(elementRef) {
  autosize(elementRef.value);
  onBeforeUnmount(() => {
    autosize.destroy(elementRef.value);
  });
}
