JSFiddle - React, Tailwind, and code Playground

by skirtle

HTML

<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<div id="app">
  <my-child></my-child>
</div>

JavaScript

const SuperChild = {
  data () {
    return {
      user: {
        name: 'Liz',
        age: 14
      }
    }
  }
}

const MyChild = {
  extends: SuperChild,
  template: `<div>{{ user.name }} - {{ user.age }}</div>`,
  
  data () {
    return {
      user: {
        name: 'John'
      }
    }
  }
}

const app = new Vue({
  components: {
    MyChild
  }
})

app.$mount('#app')