JSFiddle - React, Tailwind, and code Playground

by Numbnut

HTML

<script type="module">
    import htmel from "https://unpkg.com/htmel@latest/dist/htmel.min.js"

    window.state = {
        age: 1
    };

    let element = htmel(state)`
<div>
    I am a div and my age is ${() => state.age} seconds
</div>
`;

    document.body.appendChild(element);
    setInterval(() => state.age += 1, 1000)
</script>