Skip to main content
Module

x/jsx_stream/types.ts>RenderOptions

JSX runtime for server-side only async streaming
Latest
interface RenderOptions
import { type RenderOptions } from "https://deno.land/x/jsx_stream@v0.2.0/types.ts";

Properties

optional
deferredTimeout: number | false

Enable deferral of slow async components.

Any async component that takes longer than the given timeout will be deferred, and replaced with a placeholder in the stream. The component will eventually be rendered at the end of the stream in a block of Javascript that replaces the placeholder in the browser.

Setting this to falsy will disable deferral.

optional
deferredPlaceholder: PlaceholderRenderer

Provide a custom deferred placeholder rendering function.

optional
deferredSubstitution: SubstitutionRenderer

Provide a custom function to render the substitution of a deferred stream.

optional
streamDelay: number

Enable a delay during streaming.

This allows you to see the actual effect of streaming whilst developing locally.

optional
tagHandlers: TagHandlers

Allow custom handling of tags.

Content can be injected before/after a opening or closing tag. Useful for injecting scripts to support custom elements.