Hacker News new | ask | show | jobs
by bobthepanda 894 days ago
is it that nice?

the beauty of HTML markup is that it's declarative. at least from the tutorials I've seen, WebComponents drag you firmly back into imperative land with document.addChild everywhere.

2 comments

The imperative part is required to build a Web Component.

When you merely import it. you can use it as declaratively as any other HTML tag. Basically Web COmponents allow you to add your own tags that are rendered as components, and freely mix "built-in" and "custom" DOM nodes in your document.

I'm pretty sure a declarative shadow Dom is currently in the works.