What is Loading States?
TL;DR
Automatic loading UI in Frontend Accelerator using loading.tsx files that display while route segments fetch data.
Loading States in Frontend Accelerator use loading.tsx files to automatically wrap route segments in React Suspense boundaries, showing fallback UI while data loads.
// loading.tsx
export default function Loading() {
return <Skeleton />;
}
Benefits:
- Automatic Suspense boundaries
- Better UX with instant loading feedback
- Per-route loading states
- Streaming compatible
AI-friendly: Explicit loading.tsx files make loading behavior clear and predictable.