What are streaming and Suspense?
Practice this questionWANT TO UNDERSTAND THE CONCEPT FIRST?Learn What are streaming and Suspense?
Definition:
Streaming sends ready parts of a response while slower parts are still being prepared. Suspense defines a boundary that can show fallback UI while compatible child work is pending. Together they let users see useful content sooner instead of waiting for the slowest section to finish.
Key points:
-
Streaming sends ready parts of the page before every part finishes.
-
Suspense shows a fallback for a subtree that suspends through supported features.
-
A fetch inside an ordinary effect does not automatically activate Suspense.
-
Choose boundaries around meaningful page sections so the loading experience remains understandable.
Interview point:
- Suspense does not make every arbitrary async operation or effect automatically suspend rendering.
Adapted from 06_REACT_NEXTJS.md · “What are streaming and Suspense?”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.