JSFiddle - React, Tailwind, and code Playground

by skirtle

HTML

<script src="https://unpkg.com/[email protected]/dist/vue.global.js"></script>
<div id="app">
  <button @click="count++">
    {{ count }}
  </button>
</div>

JavaScript

Vue.createApp({
  data () {
    return {
      count: 0,
      other: 0
    }
  },
  
  updated () {
    this.other += 10
    console.log('updated: ' + this.other)
  },
  
  watch: {
    other: {
      flush: 'pre',
      
      handler () {
        console.log('other changed: ' + this.other)
      }
    }
  }
}).mount('#app')