JSFiddle - React, Tailwind, and code Playground

by smfoote

HTML

<script src="https://raw.github.com/linkedin/dustjs/master/dist/dust-full-1.1.1.js"></script>
<script src="https://raw.github.com/linkedin/dustjs-helpers/master/dist/dust-helpers-1.1.0.js"></script>
<div id="container"></div>

JavaScript

var tmpl = '{@contextDump/}';

var compiled = dust.compile(tmpl, 'example');

dust.loadSource(compiled);
var jsonData = {
    val1: 'hey there',
    arr: ['howdy', 'bom dia']
};
dust.render('example', jsonData, function(err, out) {
  $('#container').html(out);
});