Show HN: Thi.ng/hdom – S-expression based, pure ES6 UI/VDOM components
I&#x27;d still rather write markup in a format that looks like markup. I think this is why JSX is so popular.<p>This is why I prefer something like lit-html with actual markup.<p>Example from hdom readme:<p><pre><code>    &#x2F;&#x2F; component w&#x2F; local state
    const counter = (i = 0) =&gt; {
        return () =&gt; [&quot;button&quot;, { onclick: () =&gt; (i++) }, `clicks: ${i}`];
    };
</code></pre>
In lit-html:<p><pre><code>    const counter = (i = 0) =&gt; {
      return () =&gt; html`&lt;button @click=${() =&gt; i++}&gt;clicks: ${i}&lt;&#x2F;button&gt;`;
    }
</code></pre>
Yeah, there some extra weight to the close tag, but it looks like HTML.<p>Disclaimer: lit-html author. <a href="https:&#x2F;&#x2F;github.com&#x2F;Polymer&#x2F;lit-html" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Polymer&#x2F;lit-html</a>