JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
  <div>a: {{a}}</div>
  <div>b: {{b}}(a * 2의 값)</div>
  <button @click="add">더하기</button>
</div>

JavaScript

new Vue({
  el: '.container',
  data: {
    a: 0
  },
  computed: {
    b: function() {
      return this.a * 2
    }
  },
  // 메서드는 methods 객체 아래 정의 합니다.
  methods: {
    add: function(event) {
      this.a++;
    }
  }
});