Vue

HTML

<div id="app">
  <counter></counter>
</div>

CSS

body {
  background: #20262E;
  padding: 20px;
  font-family: Helvetica;
}

#app {
  background: #fff;
  border-radius: 4px;
  padding: 20px;
  transition: all 0.2s;
}

Vue

const Counter = {
	
  
  methods: {
  	setCount() {
    	this.count = this.count++;
    }
  },
  
  beforeUpdate() {
  	console.log('before update')
  },
  
  updated() {
  	console.log('updated')
  },

	template: `<div>
        hello {{ count }}
        <button v-on:click="setCount">click</button>
      </div>`
}

new Vue({
  el: '#app',
  components: {
  	Counter
  }
})