## Description A very simple vue component to have a window width and height reactive values on window resize.
npm install vue-window-resize``sh`
npm install --save vue-window-resize@latest
js
...
export default {
data() {
return {
window: {
width: 0,
height: 0
},
}
}
// rest of the component
}
...
`
$3
`js
import Vue from 'vue'
import VueWindowResize from 'vue-window-resize'
Vue.component('VueWindowResize', VueWindowResize)
`$3
`js
import VueWindowResize from 'vue-window-resize';export default {
components: {
VueWindowResize,
},
// rest of the component
}
`$3
`js
...
...
``