Skip to content

lit-ui-router-ssr / lit-ui-router-ssr / RenderToStringOptions

Interface: RenderToStringOptions ​

Defined in: packages/lit-ui-router-ssr/src/render.ts:49

Options for renderToString.

Properties ​

PropertyTypeDescriptionDefined in
dehydrate?DehydrateOptionsDraws the page's resolve payload with dehydrate from ui-router-server/ssr, called with these options on the transition the router last landed. The payload goes into the hydration signature, and bootstrap() adopts its resolves on the client in place of running them. Pass {} to draw every resolve dehydrate draws by default.packages/lit-ui-router-ssr/src/render.ts:81
elementRenderers?ElementRendererConstructor[]Element renderers passed through to @lit-labs/ssr. Defaults to [UiViewRenderer, LightElementRenderer], as prerender()'s option of the same name does, and a list passed here replaces it the same way. As there, a shadow-DOM LitElement no renderer in the list answers for renders as its bare tag, empty, and warns once per tag in development.packages/lit-ui-router-ssr/src/render.ts:73
payload?ResolvePayloadA resolve payload drawn by hand, in place of `dehydrate`, for the hydration signature to carry. Passing both throws.packages/lit-ui-router-ssr/src/render.ts:87
root?EventTargetThe render's root event target. A bare new EventTarget() is created when none is passed. The router is provided on it for the render alone and the provider removed before this returns, so a caller may attach providers of its own to it beforehand.packages/lit-ui-router-ssr/src/render.ts:65
routerUIRouterLitThe router the render reads, already standing on the page: settle it on the request's path first. It is provided on root for context-request and scoped with withRouterSync around the render, so <ui-router> descendants and the sref attribute directives both find it, and the hydration signature names the state and parameter values it stands on.packages/lit-ui-router-ssr/src/render.ts:58