Isomorphic Web Components

December 12, 2024

Web components might be great, if only you could render them on the server.Or can you? The lack of server-side rendering has become a sort of folk belief that oft goes unquestioned, and many people form opinions based on this (alleged) missing feature.Well, I am happy to report that the fears are unfounded: you can absolutely server-side render a web component. But there are a few different ways it can go down.

Source: Isomorphic Web Components | jakelazaroff.com

In recent years we’ve seen a swing back toward Server Side Rendering AKA SSR, or as I call them ‘web sites’. Recognising that the model of frameworks like React of downloading all our code then ‘rendering’ it in the browser with JavaScript is a performance anti-pattern, frameworks have moved toward supporting SSR.

One critique of Web Components is they don’t support SSR. Jake Lazaroff addresses that here.