DOM Templating API Explainer #1
Replies: 3 comments 10 replies
|
that proposal has been around for a while and my current take is that it'd be better than nothing but it's basically lit-html semantics and while that's not necessarily a bad thing, there are 2 major points I keep discussing:
To me attributes should be kept simple and throw at the very beginning so that there will be room for improvements, that means only Everything else feels like awesome, if native/backed in, yet the industry kept using JSX or Svelte or ... tools so this might be too little, too late yet I am sure more people will be interested in using this instead of requiring mandatory heavy and non-standard toolchains to produce reactive layouts. That's it from me and thanks for opening this discussion 👋 edit P.S. the hydration story is what makes this proposal extremely interesting because that's a badly solved problem with most frameworks out there ... if we nail that bit I think the whole Web will benefit from this proposal. If we focus only on client-side effects people can keep using lit or similar variants. |
|
I'm of the opinion that we should do nothing special with attribute names, so e.g. Perhaps we can introduce a mechanism for a lifecycle hook so that before an attribute is set, some JS machinery can kick in. |
|
I'll jump in here and mention FAST's current progress in this area and what our thinking is. We recently started work on implementing a solution which is available as a prerelease in On the client our solution was to use a custom element (f-template) that contains the template which is then interpreted and attached to the defined custom element with the given tag name. I agree with @justinfagnani I do prefer we build for what developers want out of the box. Ideally any JavaScript is purely component logic, not supplied by frameworks. Less JavaScript shipped, better performance, better developer experience. |
Uh oh!
There was an error while loading. Please reload this page.
@justinfagnani proposed the DOM Templating API explainer.
I think it would be good for us to discuss this, how well does it fit frameworks, is it something they could reasonably use? Would it lower complexity of frameworks if this existed in the Web Platform?
All reactions