JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://raw.github.com/petkaantonov/attemplate.js/master/attemplate.js"></script>
<script type="text/template" id="example">
@with( model ) {
<h1>@fname @lname</h1>
<p>Occupation: @occupation</p>
<h3>A list of things</h3>
<ul>
@foreach( thing in things ) {
<li>@thing</li>
}
</ul>
}
</script>
JavaScript
$("body").html(
template.getById("example")({
fname: "Joe",
lname: "Doe",
occupation: "Developer",
things: ["some", "list", "of", "things"]
}));