Title: <a href="https:&#x2F;&#x2F;github.com&#x2F;thi-ng&#x2F;umbrella&#x2F;blob&#x2F;master&#x2F;packages&#x2F;hdom&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;thi-ng&#x2F;umbrella&#x2F;blob&#x2F;master&#x2F;packages&#x2F;hdom...</a><p>Lightweight UI component tree definition syntax, DOM creation and differential updates using only vanilla JS data structures (arrays, iterators, closures, attribute objects or objects with life cycle functions, closures). By default targets the browser&#x27;s native DOM, but supports other arbitrary target implementations in a branch-local manner, e.g. to define scene graphs for a canvas element as part of the normal UI tree.<p>Benefits:<p>- Use the full expressiveness of ES6 &#x2F; TypeScript to define user interfaces<p>- No enforced opinion about state handling, very flexible<p>- Clean, functional component composition &amp; reuse<p>- No source pre-processing, transpiling or string interpolation<p>- Less verbose than HTML &#x2F; JSX, resulting in smaller file sizes<p>- Supports arbitrary elements (incl. SVG), attributes and events in uniform, S-expression based syntax<p>- Supports branch-local custom update behaviors &amp; arbitrary (e.g. non-DOM) target data structures to which tree diffs are applied to<p>- Suitable for server-side rendering and then &quot;hydrating&quot; listeners and components with life cycle methods on the client side<p>- Can use JSON for static components (or component templates)<p>- Optional user context injection (an arbitrary object&#x2F;value passed to all component functions embedded in the tree)<p>- Default implementation supports CSS conversion from JS objects for style attribs<p>- Auto-expansion of embedded values &#x2F; types which implement the IToHiccup or IDeref interfaces (e.g. atoms, cursors, derived views, streams etc.)<p>- Only ~5.5KB gzipped
Upvote: