Th

Thi.ng/hdom – S-expression based, pure ES6 UI/VDOM components

Hacker News

Thi.ng/hdom – S-expression based, pure ES6 UI/VDOM components

https://github.com/thi-ng/umbrella/blob/master/packages/hdom... 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'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. Benefits: - Use the full expressiveness of ES6 / TypeScript to define user interfaces - No enforced opinion about state handling, very flexible - Clean, functional component composition & reuse - No source pre-processing, transpiling or string interpolation - Less verbose than HTML / JSX, resulting in smaller file sizes - Supports arbitrary elements (incl. SVG), attributes and events in uniform, S-expression based syntax - Supports branch-local custom update behaviors & arbitrary (e.g. non-DOM) target data structures to which tree diffs are applied to - Suitable for server-side rendering and then "hydrating" listeners and components with life cycle methods on the client side - Can use JSON for static components (or component templates) - Optional user context injection (an arbitrary object/value passed to all component functions embedded in the tree) - Default implementation supports CSS conversion from JS objects for style attribs - Auto-expansion of embedded values / types which implement the IToHiccup or IDeref interfaces (e.g. atoms, cursors, derived views, streams etc.) - Only ~5.5KB gzipped

Share card

Actual performance

180points
64comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: cursor, user, context · Missing: mac, agents, macos
78%78% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: supports · Missing: reddit linkedin, podcasting, created
63%63% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: interface · Missing: plus, platform, intuitive
47%47% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, io · Missing: https docs, excited, just released
42%42% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
30%30% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: arr · Missing: mrr, revenue, profit
14%14% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
4%4% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

go
gomponents, HTML components in pure Go72%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

gomponents, HTML components in pure Go

Hacker News15
Go
Gomponents, HTML components in pure Go77%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Gomponents, HTML components in pure Go

Hacker News113
Bulmil
Bulmil63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Agnostic UI components library based on Web Components.

Indie Hackers3open-source
A
A pure Tcl JPEG decoder50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A pure Tcl JPEG decoder

Hacker News3
A
A pure-Ruby implementation of systemd's sd_notify(3)43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A pure-Ruby implementation of systemd's sd_notify(3)

Hacker News1
Po
Pointfree FP-Interpreter with Combinators and Pure Functions57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pointfree FP-Interpreter with Combinators and Pure Functions

Hacker News1
Go
Goredo – redo implementation on pure Go47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Goredo – redo implementation on pure Go

Hacker News2
Rt
Rtpstalk – pure Java RTPS implementation55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Rtpstalk – pure Java RTPS implementation

Hacker News13
Go
Go-osc – OSC Packet Implementation for Golang. Implemented in Pure Go47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Go-osc – OSC Packet Implementation for Golang. Implemented in Pure Go

Hacker News4
Pu
Pure functional lenses in Racket53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pure functional lenses in Racket

Hacker News2