Server-side rendering (SSR)
You can use SSR for a variety of reasons:
For a deeper dive into server-side rendering concepts and techniques generally, see Rendering on the Web on web.dev.
Lit SSR is a low-level library that you can use directly in your Node-based server or site generator. Check out an example of Lit SSR used in a Koa server.
A number of integrations have also been published which make Lit SSR work out-of-the-box:
- Lit Eleventy Plugin
- Astro integration for Lit
- ...and more under development!
Library statusPermalink to “Library status”
This library is under active development with some notable limitations we hope to resolve:
- Async component work is not supported. See issues #3219, #2469.
- Only Lit components using shadow DOM is supported. See issue #3080.
- Integration with other SSR frameworks are being worked on. See issues for NextJS and Nuxt.
- Declarative shadow DOM is not implemented in all major browsers yet, though a polyfill is available. Read more about it in client usage.
- There are also open discussions that need to happen regarding
ElementRendererRegistryfor interop with other custom elements.