Skip to content

Commit

Permalink
docs: clarify with suggestions from review
Browse files Browse the repository at this point in the history
Co-authored-by: Espen Dalløkken <[email protected]>
  • Loading branch information
wkillerud and leftieFriele authored Oct 30, 2023
1 parent 9d98156 commit 8ca7541
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ This can be configured using the config setting `app.mode`. (see the config sect

### Server Side Rendered (hydrate)

Use this mode if you're writing podlets that will be included in layouts you don't control.
Use this mode if you're writing podlets that will be included in layouts you don't control, or that include client side rendering/hydration.

When `app.mode` is set to `hydrate`, the content and fallback routes will be server rendered and then client side hydrated afterward.
No additional setup is required but see guidelines for writing SSR custom elements on the Lit docs site. [https://lit.dev/docs/ssr/authoring/](https://lit.dev/docs/ssr/authoring/).
Expand All @@ -270,8 +270,8 @@ No additional setup is required but see guidelines for writing SSR custom elemen
When `app.mode` is set to `ssr-only`, the content and fallback routes will be server rendered but will not be hydrated on the client side afterward.
This is good if you want to use components from a shared library or design system but don't actually need interactivity on the client side.

If you control the layout(s) where the podlet will be rendered, it is recommended you use this option whenever possible, since it will save many KBs of JavaScript being sent to the users browser.
The downside is, if another part of a layout does client-side render a shared component (such as an icon), Lit won't be able to properly replace the server-side rendered markup, and you end up with duplicates.
If you control the layout(s) where the podlet will be rendered, it is recommended you use this option, as it will prevent sending KBs of JavaScript to the users browser.
The downside compared to `hydrate` is, if another part of a layout does client-side render a shared component (such as an icon), Lit won't be able to properly replace the server-side rendered markup, and you end up with duplicates.

No additional setup is required but see guidelines for writing SSR custom elements on the Lit docs site. [https://lit.dev/docs/ssr/authoring/](https://lit.dev/docs/ssr/authoring/).

Expand Down

0 comments on commit 8ca7541

Please sign in to comment.