You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declarative Shadow Dom looks like a great idea but I'm missing something that is mentioned nowhere. This new feature seems useless to me unless we bring back html imports. Does anyone though about this? One cool think about libraries like react is the possibility to create components in separate files and importing/consuming them on demand.
Without <link rel="import" href="/path/to/imports/stuff.html"> we have to define all our templates in the same html file where we define our web component with JS.
The idea is cool but I don't get it, what's the gain if we cannot define html files and import them in js or html?
Html imports were deprecated: https://web.dev/imports/. If I'm not mistaken this was because there was no way to define components declaratively. Declarative Shadow Dom seems to fix this, isn't it?
This is vital for SSR, without this Web Components won't probably take off.
"but you're saying I need JS to load HTML? That doesn't seem right."
See the irony? The web's most basic content, HTML, requires the greatest amount of effort to work with. Fortunately, Web Components are here to get us back on track
The text was updated successfully, but these errors were encountered:
vricop
changed the title
Import templates using link
Bring back HTML Imports using link
Oct 21, 2022
Declarative Shadow Dom looks like a great idea but I'm missing something that is mentioned nowhere. This new feature seems useless to me unless we bring back html imports. Does anyone though about this? One cool think about libraries like react is the possibility to create components in separate files and importing/consuming them on demand.
Without
<link rel="import" href="/path/to/imports/stuff.html">
we have to define all our templates in the same html file where we define our web component with JS.The idea is cool but I don't get it, what's the gain if we cannot define html files and import them in js or html?
Html imports were deprecated: https://web.dev/imports/. If I'm not mistaken this was because there was no way to define components declaratively. Declarative Shadow Dom seems to fix this, isn't it?
This is vital for SSR, without this Web Components won't probably take off.
I think html imports make sense. It's even one of the points stated in this article: https://web.dev/imports/#why-imports
The text was updated successfully, but these errors were encountered: