Next.js
/Advanced
Streaming UI
Definition
The ability to stream React component HTML chunks from the server to the browser progressively, rather than waiting for the entire page's data requirements to resolve.
Explain Like I'm New
Instead of waiting for the slowest part of a page to load before showing anything, Streaming sends the fast parts instantly (Navbar, Text), and sends the slow parts (Database Charts) seconds later, popping them onto the screen when they are ready.
Real World Example
An AI Chatbot (like ChatGPT). It doesn't wait to generate the entire 500-word paragraph before showing it to you. It 'streams' the text down the wire word-by-word, updating the UI in real-time.
Common Use Cases
- •AI interfaces
- •Slow data fetching
- •Improving Perceived Performance
Interactive Example
Loading Code Playground...
Interview Questions
basic
- What native web protocol does Next.js use under the hood to achieve streaming without websockets?
intermediate
- How does Streaming fundamentally change the Time To First Byte (TTFB) metric?