JSFiddle - React, Tailwind, and code Playground

by evzens

HTML

<script src="https://npmcdn.com/vue/dist/vue.js"></script>
<div id="app">
<mycomp></mycomp>
<hr>
<mycomp></mycomp>
</div>

<div id="app2">
<mycomp></mycomp>
<hr>
<mycomp></mycomp>
</div>

JavaScript

var cmp = {
   data: function() {
   return {
      status: 'Critical'
   };
   },
   template:  '<p>Status server: {{ status }}   <button @click="changeStatus">Change status</button></p>',
   methods: {
      changeStatus: function() {
      this.status = 'Normal';
      }
   }
   
   
};

new Vue({
el: '#app',
components: { 
  'mycomp': cmp 
  }
});

new Vue({
el: '#app2'
});