title: Vue JS - How to get window size whenever it changes
body: <p>I'm new to vuejs but I was trying to get the window size whenever I 
     resize it so that i can compare it to some value for a function that I 
     need to apply depending on the screen size. I also tried using the 
     watch property but not sure how to handle it so that's probably why it didn't work </p>
  
  <pre><code>  methods: {
  
      elem() {
       this.size = window.innerWidth;
       return this.size;
     },
    mounted() {
      if (this.elem &lt; 767){ //some code }
     }
  </code></pre>