vue-mq icon indicating copy to clipboard operation
vue-mq copied to clipboard

VueMq($mq) computed value is not reactive when using Nuxt.

Open jaxenvisuals opened this issue 3 years ago • 1 comments

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 }],

jaxenvisuals avatar Jul 30 '21 22:07 jaxenvisuals

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?

jaxenvisuals avatar Jul 30 '21 23:07 jaxenvisuals