Skip to main content
Go to Latest
function setDeferredTimeout
import { setDeferredTimeout } from "https://deno.land/x/jsx_stream@v0.0.5/config.ts";

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.

Parameters

optional
timeoutMs: number | false