Next.js stream HTML theo từng phần thay vì đợi toàn page ready.
- Server components có thể wrap trong Suspense, phần xung quanh stream trước, khi data ready phần trong Suspense stream tiếp.
- User thấy content nhanh hơn.
- TTFB tốt hơn.
- Cần design components để render độc lập và không block lẫn nhau.
Next.js streams HTML in chunks rather than waiting for the full page to be ready.
- Server components wrapped in Suspense allow the surrounding content to stream first; when data is ready, the Suspense content streams next.
- Users see content faster and TTFB improves.
- Design components to render independently so they do not block each other.