JSFiddle - React, Tailwind, and code Playground
HTML
<div id="app">
<demo1></demo1>
<br>
<demo2></demo2>
</div>
JavaScript
var MyComponent1 = Vue.extend({
data: function(){ return {}},
template: '<a>demo 1 - {{model}}</a>',
ready: function(){
this.$set('model', 'this is the model')
}
})
var MyComponent2 = Vue.extend({
data: function(){ return {count: 0}},
template: '<a>demo 2 - {{model}}</a>',
ready: function(){
this.model = 'this is the model'
}
})
Vue.component('demo1', MyComponent1)
Vue.component('demo2', MyComponent2)
new Vue({
el: '#app'
})