News for hackers. Stuff that matters.
Re:Web Components could replace frontend frameworks? by johncolanduoni on Friday April 12, 2019 @02:25AM (#19642468)
Any stateful data structure is stateless if it’s not changed. That doesn’t seem to me to be a particularly deep revelation about the DOM.

Back to your original point, that code example you linked attatches a shadow dom, creates an element in it and then puts text in it. I fail to see how that’s declarative or stateless, and AFAIK that’s the only way to populate a shadow DOM (the original HTML of the document cannot put elements there).

There are no comments on this comment yet.