JSFiddle - React, Tailwind, and code Playground

by ozzon91

HTML

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


<template id="test">
  <ul>
    <li>{{test}}</li>
    <li v-for="i in [1,2,3,4,5,6,7,8]">
      <button @click="test++">{{i}}</button>
    </li>
  </ul>
</template>

JavaScript

Vue.component('test', {
	template: '#test',
  methods: {
  	go: function(e) {
    	alert(this.test+e);
    }
  },
  
  data: function() {
  	return {
    	test: 1
    }
  }
})


new Vue({
	el: '#app',
  data: function() {
  	return {test: 1}
  }
})