File conventions

Loading file

Defines temporary UI below the segment layout. No props are required; fast navigation may not visibly show the fallback. Source: https://nextjs.org/docs/app/api-reference/file-conventions/loading

Formal Syntax & Structure

nextjs syntaxnextjs
app/<segment>/loading.tsx

Working Example

Example Snippetnextjs
export default function Loading() {  return <p role="status">Loading new releases...</p>;}
Next.js Reference