JSFiddle - React, Tailwind, and code Playground

by proticm

HTML

<script src="https://cdn.jsdelivr.net/npm/@plazarjs/core/dist/core.min.js"></script>

JavaScript

pz.define('my-mixin', { 
  ownerType: 'mixin', 
  name: 'John', 
  sayHello: function() { 
    alert('Hello, my name is: ' + this.name); 
  } 
}); 

pz.define('my-component', { 
  ownerType: 'component', 
  autoLoad: true, 
  template: '<div>My first child Component!</div>', 
  renderTo: 'body', 
  mixins: ['my-mixin'] 
  // other configs 
}); 

var componentDef = pz.getDefinitionOf('my-component'); 
var instance = componentDef.create(); 
instance.sayHello();