title: Best way to dynamically change the order of block level elements in Vue?
body: <p>Suppose I have three divs - A, B, and c - and I want to change their order when a user clicks "reorder". Eg, by putting B first, C second, and A third. What is the cleanest way to do this in Vue?</p>
  
  <p><em>Edit: in reality, there is a lot of content in the divs, so doing something like <code>{ divs: ['A', 'B', 'C'] }</code> with a <code>v-for</code> would get too messy.</em></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>let app = new Vue({
    el: '#app',
    methods: {
      reorder: function () {
      },
    },
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"&gt;&lt;/script&gt;
  &lt;div id="app"&gt;
    &lt;div&gt;A&lt;/div&gt;
    &lt;div&gt;B&lt;/div&gt;
    &lt;div&gt;c&lt;/div&gt;
    &lt;button v-on:click="reorder()"&gt;Reorder&lt;/button&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>