DEV Community

Discussion on: Can web components UI use dynamic data from our backends DB as input?

Collapse
 
bennypowers profile image
Benny Powers 🇮🇱🇨🇦

Web components are just HTML, so they don't need SSR.

But if you really want, you can try @lit-labs/ssr

Thread Thread
 
yamita profile image
Yamita

VERY INTERESTIN!! I will like the Lit project is basically building the hype train now and it will start to take off maybe by the end of the year. Definitely want to be one of the early adapters.

I personally don't care if something is CSR/SSR from a functionality point of view and think that if a web page is fast enough for CSR it saves you money on lower server load. But I just heard that SSR/SSG is better for SEO so that's why I assumed it was a big deal for commercial reasons.

Then again these lighthouse tests at the bottom graphs show how the cleaner code from web components DOMINATE SEO scores compared to frontend libs: wix.engineering/post/is-stencil-a-...

~90 of 100 SEO for web components vs ~70 of 100 for JS libs.

They didn't have Lit in the comparison but I'm confident it would have scored similarly to stencil if not better. Not sure if these SEO scores are on a per component bases though instead of SEO of the website as a whole. But I remember reading that Google has started ranking speed as important and web components are definitely A LOT faster. Now you have more ammo in your future blogs! Looking forward to them.

Thread Thread
 
bennypowers profile image
Benny Powers 🇮🇱🇨🇦