JSFiddle - React, Tailwind, and code Playground

by skirtle

HTML

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

JavaScript

const Base = {
  custom: 'base-value',

  data () {
    return {
      base: 123
    }
  }
}

const ComponentA = {
  extends: Base
}

const app = new Vue({
  extends: ComponentA,
  
  created() {
    console.log('custom: ' + this.$options.custom)
    console.log('data: ' + this.base)
  }
})

app.$mount('#app')