JSFiddle - React, Tailwind, and code Playground

by Simon Herteby

HTML

<div id="vue">
<child></child>
</div>

JavaScript

new Vue({
	el:'#vue',
  data(){
  	return {
      one:1,
      two:2
    }
  },
  components:{
  	child:{
    	data(){
      	return {
        	three:3,
          four:4
        }
      },
      mounted(){
      	console.log(this)
      },
    	template:`
      	<div>
        	<div v-for="item in ['one', 'two']">
          	{{$parent[item]}}
          </div>
          <div v-for="item in ['three', 'four']">
          	{{$data[item]}}
          </div>
        </div>      
      `
    }
  }
})