loading.tsx tự động tạo Suspense boundary bọc page hoặc layout, hiển thị loading UI ngay lập tức khi navigate.
- Streaming: Next.js stream HTML từng phần, user thấy nội dung nhanh hơn thay vì đợi toàn trang.
- Instant loading states không cần manually thêm Suspense và fallback UI.
loading.tsx automatically creates a Suspense boundary around a page or layout, showing a loading UI instantly on navigation.
- Next.js streams HTML in chunks so users see content progressively rather than waiting for the full page.
- This gives instant loading states without manually adding Suspense and fallback UI.