Routing: Loading UI and Streaming | Next.js
Built on top of Suspense, Loading UI allows you to create a fallback for specific route segments, and automatically stream content as it becomes ready.
This page is also available as Markdown at /docs/app/api-reference/file-conventions/loading.md . For an index of Next.js documentation , see /docs/llms.txt . Copy page loading.js Last updated March 13, 2026 The special file loading.js helps you create meaningful Loading UI with React Suspense . With this convention, you can show an instant loading state from the server while the content of a route segment streams in. The new content is automatically swapped in once complete. app/feed/loading.tsx TypeScript JavaScript TypeScript export default function Loading () { // Or a custom loading skelet
Explore this link on the map →saved by
related reading
- Getting Started: Fetching Data | Next.jsnextjs.org
- Getting Started: Fetching Data | Next.jsnextjs.org
- Getting Started: Caching | Next.jsnextjs.org
- Getting Started: Error Handling | Next.jsnextjs.org
- App Router: Streaming | Next.jsnextjs.org
- Getting Started: Layouts and Pages | Next.jsnextjs.org
- Getting Started: Linking and Navigating | Next.jsnextjs.org
- How Notion pulled itself back from the brink of failure | Figma Blogfigma.com
- Cursor Docs — Agent, Rules, MCP, Skills & CLIdocs.cursor.com
- Getting Started: Fetching Data | Next.jsnextjs.org
- renderToPipeableStream – Reactreact.dev
- Building a single-page application with Next.js and React Routercolinhacks.com