title: Vuejs and Vue.set(), update array
body: <p>I'm new to Vuejs. Made something, but I don't know it's the simple / right way.</p>
  
  <p><strong>what I want</strong></p>
  
  <p>I want some dates in an array and update them on a event. First I tried Vue.set, but it dind't work out. Now after changing my array item:</p>
  
  <pre><code>this.items[index] = val;
  this.items.push();
  </code></pre>
  
  <p>I push() nothing to the array and it will update.. But sometimes the last item will be hidden, somehow... I think this solution is a bit hacky, how can I make it stable?</p>
  
  <p>Simple code is here:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>new Vue({
    el: '#app',
    data: {
     f: 'DD-MM-YYYY',
      items: [
        "10-03-2017",
        "12-03-2017"
      ]
    },
    methods: {
      
      cha: function(index, item, what, count) {
       console.log(item + " index &gt; " + index);
        val = moment(this.items[index], this.f).add(count, what).format(this.f);
      this.items[index] = val;
        this.items.push();
        console.log("arr length:  " + this.items.length);
      }
    }
  })</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>ul {
    list-style-type: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.11/vue.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"&gt;&lt;/script&gt;
  &lt;div id="app"&gt;
    &lt;ul&gt;
      &lt;li v-for="(index, item) in items"&gt;
      &lt;br&gt;&lt;br&gt;
        &lt;button v-on:click="cha(index, item, 'day', -1)"&gt;
        - day&lt;/button&gt;
        {{ item }}
        &lt;button v-on:click="cha(index, item, 'day', 1)"&gt;
        + day&lt;/button&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>