Module sycamore::suspense

source ·
Expand description

Suspense with first class async/await support.

The Suspense component is used to “suspend” execution and wait until async tasks are finished before rendering.

Structs§

Functions§

  • Suspense lets you wait for async tasks to complete before rendering the UI. This is useful for asynchronous data-fetching or other asynchronous tasks.
  • Waits until all suspense tasks created within the scope are finished. If called inside an outer suspense scope, this will also make the outer suspense scope suspend until this resolves.
  • Creates a new “suspense scope”. This scope is used to signal to a Suspense component higher up in the component hierarchy that there is some async task that should be awaited before rendering the UI.
  • Create a new TransitionHandle. This allows executing updates and awaiting until all async tasks are completed.