Answers for "track window resize in vue"

1

track window resize in vue

created() {
  window.addEventListener("resize", this.myEventHandler);
},
destroyed() {
  window.removeEventListener("resize", this.myEventHandler);
},
methods: {
  myEventHandler(e) {
    // your code for handling resize...
  }
}
Posted by: Guest on August-16-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language