Elektrine lite

← Feed

@jonikorpi@mastodon.gamedev.place

Post #1619740

2026-01-20 20:04 UTC

More people need to know about lit-html. (It’s not a framework or a web components thing.) https://lit.dev/docs/libraries/standalone-templates/ You get to render HTML like this: ``` render( html`<h1>Hello</h1>`, document.body ) ``` and then to update it like this: ``` render( html`<h1>Hello <b>world</b></h1>`, document.body ) ``` It takes care of all the diffing, patching, and memoizing. The performance is good. You get to structure your program around it any way you like. It’s great.

Replies (5)