DEV Community

Discussion on: Why We Use Web Components

Collapse
 
megazear7 profile image
megazear7

Great post! I think the only thing I am not sold on with regards to web components is the concept of hydration. It seems to me that the correct solution should not be to mimic render the component on the server and then replace the light dom with shadow dom after the page comes on line.

I would almost rather see some standardization around web components using the light dom for stuff that should be SSR, and the shadow dom for stuff that is "internal". I don't know exactly what the best approach would be, but I would like to see some exploration around alternatives to hydration.

Although I think the "right solution" will be the one that major web component based libraries and frameworks can agree on over the next five years. If everyone seems to come to an agreement on it I would go for it, but before the community comes to a decisive opinion I would like to see some other options explored.