JSFiddle - React, Tailwind, and code Playground

by Derek Anderson

JavaScript

enyo.kind({
    name: "testKind",
    components:[{
        kind:"enyo.DataRepeater",
        name:"repeater", 
        components: [
			{components: [
				{components: [
					{name: "message"},
				]}
			], bindings: [
				{from: ".model.message", to: ".$.message.content"},
			]}
		]
    }],
    bindings: [
		{from: ".collection", to: ".$.repeater.collection"}
	],
	create: enyo.inherit(function (sup) {
        //take glob from data, and make it 
        //a new property of kind collection on THIS kind called collection
        //it will be used from binding
		return function () {
			this.collection = new enyo.Collection(this.data);
			sup.apply(this, arguments);
		};
	}),
    data: [
		{ message: "Walsh" },
		{ message: "James" },
		{ message: "Lott" },
	],
});
        
new testKind().renderInto(document.body);