import { useRef } from "react";
import { useSize } from 'ahooks';
export function useSizeHook() {
  const ref = useRef<HTMLDivElement>(null);
  const size = useSize(ref) || { width: 0, height: 0};

  return {
    size,
    ref
  }
}