|
|
|
|
|
by kaoD
648 days ago
|
|
Web components are the stuff that nightmares are made of. The amount of boilerplate I had to write just to keep DOM attributes and JS properties in sync was not fun, the impedance mismatch between them (DOM attributes being strings) was painful to deal with, and templates/slots felt much worse than the React way. The DOM didn't seem like a great model for moderately complex apps. Feels like web components didn't take off for a reason. IMO they feel like the solution you come up with when you create an abstraction in paper instead of writing a real-world thing that will solve your immediate problems. Not very pragmatic. Plus they only work with JS enabled, unlike React+SSR where you can progressively enhance your app. Overall not a great experience for user-facing apps. |
|
You can SSR web components using the Declarative Shadow DOM API, which is finally supported in all of the major browsers and works without JS.