JSFiddle - React, Tailwind, and code Playground
by skirtle
HTML
<script src="https://unpkg.com/[email protected]/dist/vue.global.js"></script>
<div id="app"></div>
JavaScript
const { createApp, h } = Vue
const app = createApp({
render () {
console.log('render')
return h('button', {
onClick: () => {
this.count++
}
}, `Increment ${this.count}`)
},
data () {
return {
count: 0,
chain: 0
}
},
watch: {
count: {
flush: 'pre',
handler () {
console.log('count watch')
this.chain = Date.now()
}
},
chain: {
flush: 'pre',
handler () {
console.log('chain watch')
}
}
}
})
app.mount('#app')