3 ms·
> On the other hand if you write templates in JS As a non-programmer (UX), I used to watch Polymer with so much interest, since it had HTML tag-like syntax. I
by redindian75 7y ago
> On the other hand if you write templates in JS
As a non-programmer (UX), I used to watch Polymer with so much interest, since it had HTML tag-like syntax. I copy paste component codes & construct an UI.
There was simplicity in
<googlemaps lat="89.2" long="123.2" draggable="false"></googlemaps>
Now with lit-html, it went from unique HTML/WebComponent for non-coders, to another one of the JS frameworks out there.
- e12e 7y agoI used to like the idea of (originally zope's) metal/tal templates. In theory the templates where valid html, complete with example values - and could be edited directly. Unfortunately this breaks down as soon as you start to break up the page into sections (you end up with a component that needs a "layout" to provide surrounding <html><body>(...) etc). Ironically, now with html5 being rather loose and fast, you might actually get a decent preview of such a widget again... But it's still not right for "web applications" as opposed to "hypertext applications". Full applications need full gui widgets - and html isn't a good fit.
- tylerhou 7y agoYou can absolutely still use React/Polymer/other JS frameworks in that same manner, but you have to learn a little bit of coding boilerplate. I think one difference between lit-html and React/other JS frameworks is that lit-html knows which portions of its template are static, and can avoid reconciling static portions. This is the same optimization as what Svelte can do, but without the need to change your toolchain. Disclaimer: I work at Google, but on a completely unrelated team.
- spankalee 7y agoI'm only talking about the _implemention_ of web components. You can still use any custom element from HTML. If <google-maps> was rewritten in LitElement, you'd still be able to write: <google-maps lat="89.2" long="123.2" draggable="false"></google-maps>