3 ms·
Other than quibbling over the word "template", how does that differ from what TFA is describing?
by sethaurus 1y ago
Other than quibbling over the word "template", how does that differ from what TFA is describing?
- hsn915 1y agoThe linked proposal has many "features" that would be "needed" if you frame the problem in terms of a "template api", centered around "binding" variables, and what not. https://github.com/WICG/webcomponents/issues/1069 https://github.com/WICG/webcomponents/issues/1069 My proposal only adds one native function with nothing else: no new data types, no new apis.
- WickyNilliams 1y agoDoesn't your proposal implicitly introduce the concept of a virtual DOM, which the browser does not have? You'd need to spec out what that looks like. It adds one new API from the users perspective but much more from the browsers perspective. Additionally the next generation of Frameworks do not use virtual DOM. Solid and svelte do not. Vue is moving away from it. Signals are directionally where they're all heading.
- hsn915 1y agoThe API surface I propose only includes one function. No type needed. It does not even require the target node to be created with a virtual dom in the first place. Just diff the node with the given tree structure efficiently. Internally the browser might need to create a few accelerator data structures, but that's an implementation detail.