JSFiddle - React, Tailwind, and code Playground

by Nicholas Bridgemohan

HTML

<script src="https://unpkg.com/vue/dist/vue.js"></script>

<div id="app">
<button v-on:click="increment">increment</button>

  
  <p>counter: {{counter}} </p>
  <p>clicks : {{clicks}} </p>
  
</div>

CSS

.red{
  background-color:red;
}

.blue{
  background-color:blue;
}

JavaScript

new Vue({
el:"#app",
data:{
	counter: 0,
  clicks: 0
},
methods:{
	increment(){
    this.clicks++
  }
},
computed:{
	counter(){
  	return this.clicks*2;
  }
}

})