Skip to content

Lit Questions ( Pre-rendering / Static / SSR / Performance ) #4551

Answered by augustjk
MentalGear asked this question in Q&A
Discussion options

You must be logged in to vote
  1. There is a way to server render the custom elements built with Lit. https://lit.dev/docs/ssr/overview/ It produces declarative shadow DOM to produce HTML markup that browsers can parse and attach shadowroot content without any JS. Browser support for this feature is fairly new and I'm not actually sure how it fares with bots and crawlers. My understanding is that most bots should execute JS before grabbing the page. At least google does (https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics).
  2. Shadow DOM probably is an extra overhead since it's adding another document to the tree but it comes with benefits like built-in scoping and composition with s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MentalGear
Comment options

Answer selected by MentalGear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants