Skip to content

页面路由

¥Pages Router

你正在查看 Pages Router 的文档。有关最新功能,请参阅 应用路由 文档。

¥You're viewing the documentation for the Pages Router. See the App Router documentation for the latest features.

页面路由使用直观的文件系统路由将每个文件映射到路由。

¥The Pages Router uses an intuitive file-system router to map each file to a route.

在 Next.js 13 之前,Pages Router 是在 Next.js 中创建路由的主要方式。它在较新版本的 Next.js 中仍然受支持,但我们建议你迁移到新的 应用路由 以利用 React 的最新功能。

¥Before Next.js 13, the Pages Router was the main way to create routes in Next.js. It's still supported in newer versions of Next.js, but we recommend migrating to the new App Router to leverage React's latest features.