Type Alias: SuspenseRoot

Estimated reading time: less than 1 minute
type SuspenseRoot = object

The SUSPENSE_ROOT is a global object that holds the state of all the suspense components rendered in the server.

Properties

autoScript

autoScript: boolean

If we should automatically stream SuspenseScript before the first suspense is rendered. If you disable this setting, you need to manually load the SuspenseScript in your HTML before any suspense is rendered. Otherwise, the suspense will not work.

Default

true

requestCounter

requestCounter: number

This value is used (and incremented shortly after) when no requestId is provided for renderToStream

Default

1

requests

requests: Map<number | string, RequestData>

The requests map is a map of RequestId x SuspenseData containing the stream to write the HTML, the number of running promises and if the first suspense has already resolved.