JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<div id="placeholder">This will get replaced by handlebars.js</div>
<script id="myTemplate" type="text/x-handlebars-template">
    <table>
        <tbody>
            <tr><th>testing</th><td> <input type="text"><td></tr>
                {{#each selected}}
                <tr><th> {{@key}}</th><td><input type="text" value="{{.}}"><td></tr>
            {{/each}}
        </tbody>
    </table>
</script>

JavaScript

var source = document.getElementById("myTemplate").innerHTML;
        var template = Handlebars.compile(source);
        var index=0;
        var data = {
            names: [
            { name: "foo",id:'id',type:"type"},
            { name: "bar",id:'id' },
            { name: "baz",id:'id' }
            ]};
document.getElementById("placeholder").innerHTML = template({selected:data.names[index]});