Loading
Next.js's system for organizing pages using folders — each folder becomes a URL path, like how floors in a building have room numbers.
The routing system in Next.js 13+ that uses the app/ directory with special files (page.tsx, layout.tsx, loading.tsx, error.tsx) to define routes, layouts, and loading/error states. It replaces the older pages/ directory with nested layouts and React Server Components.
The App Router implements a segment-based routing model where each directory is a route segment with co-located special files. Layouts are preserved across navigations (no remount), and templates (template.tsx) opt into remounting. Parallel routes (@slot) and intercepting routes ((..)slug) enable modal patterns and complex UI compositions. Route groups ((groupname)) organize without affecting the URL.