a post-component library for building user-interfaces on the web.
at main 26 lines 462 B view raw view rendered
1# `dhtml` 2 3a post-component library for building user interfaces on the web. 4 5```javascript 6import { html } from 'https://tombl.github.io/dhtml/dist/index.js' 7import { createRoot, invalidate } from 'https://tombl.github.io/dhtml/dist/client.js' 8 9const app = { 10 i: 0, 11 render() { 12 return html` 13 <button 14 onclick=${() => { 15 this.i++ 16 invalidate(this) 17 }} 18 > 19 Count: ${this.i} 20 </button> 21 ` 22 }, 23} 24 25createRoot(document.body).render(app) 26```