Open jaxenvisuals opened 3 years ago
When I resize the browser window, the value for $mq remains the same. But in the demo, it is reactive. Here's my code below:
plugins/vue-mq.js `import Vue from 'vue' import VueMq from 'vue-mq'
// Vue MQ Vue.use(VueMq, { breakpoints: { // default breakpoints - customize this sm: 640, md: 768, lg: 1024, xl: 1280, xxl: 1440, }, defaultBreakpoint: 'sm', // customize this for SSR }) `
nuxt.config.js plugins: [{ src: '~plugins/vue-mq.js', ssr: false }],
plugins: [{ src: '~plugins/vue-mq.js', ssr: false }],
So I just realized that the moment I used this.$mq in a computed property, it became reactive. I was only watching it from the vue browser inspector. Is this a bug or a normal flow?
When I resize the browser window, the value for $mq remains the same. But in the demo, it is reactive. Here's my code below:
plugins/vue-mq.js `import Vue from 'vue' import VueMq from 'vue-mq'
// Vue MQ Vue.use(VueMq, { breakpoints: { // default breakpoints - customize this sm: 640, md: 768, lg: 1024, xl: 1280, xxl: 1440, }, defaultBreakpoint: 'sm', // customize this for SSR }) `
nuxt.config.js
plugins: [{ src: '~plugins/vue-mq.js', ssr: false }],