Re:Virtual DOM is pure overhead (2018)
by ec109685 on Saturday May 18, 2019 @10:30PM
(#19951061)
One thing nice about React is that it can take care of quoting for you depending on the method call the jsx template translates into (attribute, value, element name). String templates doesn’t have that nice property.
[ Parent
| on HN ]
Can you explain that more?
I'm not sure what you're saying is true with lit-html. You don't have to quote attributes with single expressions.
html`<div class=${myClass}></div>`
is perfectly fine.Ah, thanks for pointing that out.
Re:Virtual DOM is pure overhead (2018)
by arthurdenture on Saturday May 18, 2019 @11:04PM
(#19951183)
lit-html is context-aware and safe, just like JSX. It's not a raw string templating library.
https://lit-html.polymer-project.org/guide/template-referenc...