Suspense
ELI5 — The Vibe Check
Suspense is React's way of saying 'hold on, something is loading, show this placeholder instead of crashing.' Wrap your async stuff in Suspense, give it a fallback, and React handles the loading state gracefully. No more isLoading && spinner everywhere.
Real Talk
Suspense is a React component that declaratively handles loading states for asynchronous operations. It catches promises thrown by child components during rendering and displays a fallback UI until the async operation completes, enabling coordinated loading states.
Show Me The Code
<Suspense fallback={<Spinner />}>
<AsyncComponent />
</Suspense>
When You'll Hear This
"Suspense boundaries let you control exactly where loading spinners appear" / "Nested Suspense gives you waterfall control for free"
Related Terms
Error Boundary
Error Boundaries are like safety nets in a circus.
Skeleton Loading
Skeleton Loading shows gray placeholder shapes where content will appear, like a ghost version of your page.
Streaming SSR
Streaming SSR sends HTML to the browser as it's generated, not all at once.