Function: AutoSuspense()

Estimated reading time: less than 1 minute
function AutoSuspense(props): Element

A Suspense boundary that obtains its request ID from the current automatic Suspense scope.

Framework integrations establish this scope when their autoSuspense option is enabled. Use Suspense with an explicit rid outside those environments.

Parameters

props

AutoSuspenseProps

Returns

Element

Example

<AutoSuspense fallback={<div>Loading...</div>}>
  <AsyncContent />
</AutoSuspense>

Throws

If no automatic Suspense scope is active.