JSFiddle - React, Tailwind, and code Playground

by darknessm0404

HTML

<h2>Participants</h2>
Here are the participants:
<div data-bind="template: { source: test, foreach: people }"></div>
<script type="text/html" id="person-template">
    <h3 data-bind="text: name"></h3>
    <p>Credits: <span data-bind="text: credits"></span></p>
</script>

JavaScript

function MyViewModel() {
     this.people = [
         { name: 'Franklin', credits: 250 },
         { name: 'Mario', credits: 5800 }
     ]
     this.test = document.getElementById('person-template');// 'person-template';
 }
 ko.applyBindings(new MyViewModel());