title: Vuejs Es6 class reactivity
body: <p>i'm trying to have a computed property in vuejs associated to a es6 class.
  My Vue instance looks like this: </p>
  
  <pre><code>...
  props: ['customClass'],
  computed: {
      localClass: {
           get() {
               return this.customClass
           },
           set (value) {
               console.log("changed")
           }
       }
   }
   ...
  </code></pre>
  
  <p>My class looks like this</p>
  
  <pre><code>class CustomClass {
      constructor () {
          this.selected = false
      }
  }
  </code></pre>
  
  <p>If i try to do something like that:</p>
  
  <pre><code>this.localClass.selected = true
  </code></pre>
  
  <p>but the setter is never called, like the reactivity has been lost and i don't understand why.</p>
  
  <p>I also try:</p>
  
  <pre><code>Vue.set(this.localClass, 'selected', true)
  </code></pre>
  
  <p>I pass customClass as a prop, but even creating a new instance directly in the component it doesn't change the result.</p>
  
  <p>In vuejs docs i don't recall a section talking about reactivity problem in es6 class, so i was wondering if someone know why and how to make my class reactive.</p>
  
  <p>Thanks in advance </p>