Variable: SuspenseRoot
Estimated reading time: less than 1 minuteThe SuspenseRoot is a store that holds the state of all the suspense components rendered
in the server.
This was previously a global object called SUSPENSE_ROOT, but it was moved out of the
global scope to avoid many issues related to global state.
Type Declaration
autoScript
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
requestCounter
This value is used (and incremented shortly after) when no requestId is provided for
renderToStream
Default
requests
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.