import { onMounted , onUnmounted } from "vue" ; export default function useOnWindowResize ( handler ) { onMounted ( ( ) => window . addEventListener ( "resize" , handler , false ) ) ; onUnmounted ( ( ) => window . removeEventListener ( "resize" , handler , false ) ) ; }