Created
April 3, 2024 01:16
-
-
Save richardevcom/2cbea9635528c9e2c69d7067bdcc05bc to your computer and use it in GitHub Desktop.
Nuxt 3 & Vue.js 3 on window resize event listener.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup lang="ts"> | |
onMounted(() => window.addEventListener("resize", onResize, true)) | |
function onResize(): void { | |
console.log("Resized") | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment