JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdn.jsdelivr.net/g/vue@2"></script>
<script src="https://unpkg.com/v@0.2/v.min.js"></script>
<div id="counter" v-cloak>
<button class="btn btn-default" v-on:click="v.counter--">-</button>
<strong style="size: 2em">{{ v.counter }}</strong>
<button class="btn btn-default" v-on:click="v.counter++">+</button>
</div>
CSS
[v-cloak] {
display: none;
}
JavaScript
V('counter-example', v => {
new Vue({
el: '#counter',
data: {
v: v
},
computed: {
counter: {
get () {
return this.v.counter
},
set (val) {
this.counter = val
}
}
}
})
})