Skip to content
React·Intermediate·Coding·1 min read

What does Suspense do?

Short interview answer

Suspense coordinates a fallback while descendant work declares that it is not ready. It is a boundary for loading and reveal behavior, not a general-purpose data-fetching API by itself. Framework integration determines which data sources can suspend.

Example

JSX
<Suspense fallback={<Spinner />}>  <Profile />        {/* suspends while its data/code loads */}  <Feed /></Suspense>

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to Suspense

Related questions