App Router
A new routing paradigm introduced in Next.js 13 based on the app directory, using React Server Components by default and supporting nested layouts, streaming rendering, and parallel routes; it is the officially promoted routing approach.
Core Facts
App Router is a next-generation routing architecture introduced in Next.js 13, built on React Server Components.
In App Router, page.tsx automatically becomes the page component, layout.tsx automatically becomes the layout component, and loading.tsx automatically becomes the loading state component.
In Next.js's App Router mode, the src/app directory uses a file-system-based routing mechanism where the directory structure maps directly to URL paths.
Timeline (last 90 days)
Next.js 15's App Router and Server Components help the educational knowledge base pages be indexed by search engines.
Server Components in the Next.js App Router are rendered on the server side by default and do not bundle component code or data into the client-side JavaScript bundle, preventing sensitive logic and credentials from being exposed to the browser.
All Facts (11)
App Router is a next-generation routing architecture introduced in Next.js 13, built on React Server Components.
75%VerifiedIn App Router, page.tsx automatically becomes the page component, layout.tsx automatically becomes the layout component, and loading.tsx automatically becomes the loading state component.
65%VerifiedIn Next.js's App Router mode, the src/app directory uses a file-system-based routing mechanism where the directory structure maps directly to URL paths.
65%UnverifiedApp Router相较于旧版Pages Router原生支持服务端组件、流式渲染(Streaming)、并行路由(Parallel Routes)等高级特性
90%UnverifiedServer Components in the Next.js App Router are rendered on the server side by default and do not bundle component code or data into the client-side JavaScript bundle, preventing sensitive logic and credentials from being exposed to the browser.
60%UnverifiedNext.js 15's App Router and Server Components help the educational knowledge base pages be indexed by search engines.
50%UnverifiedgenerateStaticParams是App Router中替代Pages Router时代getStaticPaths的API,允许开发者返回参数对象数组以在构建阶段预渲染动态路由为静态HTML
50%UnverifiedNext.js App Router引入路由组(Route Groups)概念,使用圆括号(groupName)来组织文件而不影响URL结构
50%Unverified在App Router中开发者需通过'use client'指令标记服务端组件与客户端组件的边界
50%UnverifiedIn App Router, pages are server-rendered by default, layouts (Layout) can be nested and reused, and data fetching is done directly inside components via async/await.
50%UnverifiedApp Router was stabilized in 2023 with Next.js 13, introducing a new app directory structure redesigned around the React Server Components architecture.
50%