JSFiddle - React, Tailwind, and code Playground

by vikikamath

HTML

<main></main>

JavaScript

var MyComp = Ractive.extend({

	template: 'This is the value: {{boo}}'
  
})

var r = new Ractive({
	el: 'main'
  , template: '<MyComp boo="{{fromParent}}"/>'
  , components: {
  	MyComp: MyComp
  }
  , data: function() {
  
  	return {
    	//fromParent: 'init'
    }
  }

})

function loop(){
var to = setTimeout(function(){
	r.set('fromParent', Date.now());
  clearTimeout(to);
  loop();
}, 3000);
}

loop()