You're reading the 1.x docs. Go to latest

Skip to content

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

Interface: RenderToStringOptions ​

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

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:125
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; pass shadowElementRenderers to draw it.packages/lit-ui-router-ssr/src/render.ts:117
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:131
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:108
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:101