Skip to content

Commit

Permalink
docs(ssr): document limitation on object parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Jan 24, 2025
1 parent aefd881 commit 27488c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/framework-integration/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ Please be aware of the following limitations when working with server side rende

- A Declarative Shadow DOM not only encapsulates the HTML structure of a component but also includes all associated CSS. When server-side rendering numerous small components with extensive CSS, the overall document size can significantly increase, leading to longer initial page load times. To optimize performance, it's essential to maintain a manageable document size that aligns with your performance objectives. It is advisable to server-side render only the critical components required for rendering the initial viewport, while deferring the loading of additional components until after the initial render.
- A Stencil component that dynamically renders content based on elements within its Light DOM may not render correctly as the Output Target can't always serialize the children of the React component into a template string especially when working with multiple nested Stencil components.
- Currently Stencil does not support the serialization of objects within properties. This means that Stencil ignores server side rendering all properties that are defined with a reference types, e.g. `object`.

## API

Expand Down
9 changes: 5 additions & 4 deletions docs/framework-integration/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ If your Vue framework supports server side rendering, e.g. when using [Nuxt](htt
}
```

3. Set the `hydrateModule` in your React output target configuration, e.g.
3. Set the `hydrateModule` in your Vue output target configuration, e.g.
```ts title="stencil.config.ts"
import { Config } from '@stencil/core';
import { vueOutputTarget } from '@stencil/vue-output-target';
Expand All @@ -408,11 +408,12 @@ If your Vue framework supports server side rendering, e.g. when using [Nuxt](htt

That's it! Your Nuxt application should now render a Declarative Shadow DOM on the server side which will get automatically hydrated once the Vue runtime initiates.

:::cautions
#### SSR Limitations

A Declarative Shadow DOM not only encapsulates the HTML structure of a component but also includes all associated CSS. When server-side rendering numerous small components with extensive CSS, the overall document size can significantly increase, leading to longer initial page load times. To optimize performance, it's essential to maintain a manageable document size that aligns with your performance objectives. It is advisable to server-side render only the critical components required for rendering the initial viewport, while deferring the loading of additional components until after the initial render.
Please be aware of the following limitations when working with server side rendered applications:

:::
- A Declarative Shadow DOM not only encapsulates the HTML structure of a component but also includes all associated CSS. When server-side rendering numerous small components with extensive CSS, the overall document size can significantly increase, leading to longer initial page load times. To optimize performance, it's essential to maintain a manageable document size that aligns with your performance objectives. It is advisable to server-side render only the critical components required for rendering the initial viewport, while deferring the loading of additional components until after the initial render.
- Currently Stencil does not support the serialization of objects within properties. This means that Stencil ignores server side rendering all properties that are defined with a reference types, e.g. `object`.

## API

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ Please be aware of the following limitations when working with server side rende

- A Declarative Shadow DOM not only encapsulates the HTML structure of a component but also includes all associated CSS. When server-side rendering numerous small components with extensive CSS, the overall document size can significantly increase, leading to longer initial page load times. To optimize performance, it's essential to maintain a manageable document size that aligns with your performance objectives. It is advisable to server-side render only the critical components required for rendering the initial viewport, while deferring the loading of additional components until after the initial render.
- A Stencil component that dynamically renders content based on elements within its Light DOM may not render correctly as the Output Target can't always serialize the children of the React component into a template string especially when working with multiple nested Stencil components.
- Currently Stencil does not support the serialization of objects within properties. This means that Stencil ignores server side rendering all properties that are defined with a reference types, e.g. `object`.

## API

Expand Down

0 comments on commit 27488c5

Please sign in to comment.