3 ms·
My experience with web components has been great if you are doing SPAs or if you can load the web components dynamically/bundle them. However, when doing SSR it
by tmm84 4y ago
My experience with web components has been great if you are doing SPAs or if you can load the web components dynamically/bundle them. However, when doing SSR it was hit and miss because of the need for a window or document object to be present which doesn't exist on the server during SSR. For client-side web development I would say they are good but for hybrid client/server side web development they don't work as I thought they would. The real advantage I see with web components is that regardless of web framework (react, vue, svelte, etc.) you get components/elements that can be plugged in and just work (YMMV) so it makes them framework agnostic in a sense. That's the selling point in my opinion. That and the shadow-dom but that is more of a styling pro/con depending on your point of view.