|
|
|
|
|
by toxmeister
2821 days ago
|
|
Thanks for the clarifications & apologies if I misunderstood some parts earlier. Will definitely check out your project more closely... From a quick glance at the docs, though it seems to me there're a lot of other differences in approach (apart from the syntactic differences), especially WRT state. I will have to study these further before being able to comment properly... Just one more note about XML vs. JS syntax to describe elements. As I said earlier, am sure there's ton of people who prefer the familiar way, but objectively, do you really find hdom's approach less readable? Honest question! // lit-html
list = html`<ul>${items.map((i) => html`<li>${i}</li>`)}</ul>`
// hdom
list = ["ul", items.map((i) => ["li", i])]
|
|
Check out this app component in PWA Starter Kit: https://github.com/Polymer/pwa-starter-kit/blob/master/src/c...
Or the template from the js-framework-benchmarks: https://github.com/krausest/js-framework-benchmark/blob/mast...
Or the template from one of the wired-elements: https://github.com/wiredjs/wired-elements/blob/master/packag...
Given HTML-specific syntax-highlighting and large templates, I really think the HTML format is easier to read.