Skip to main content

页面路由

在 Next.js 13 之前,Pages Router 是在 Next.js 中创建路由的主要方式。它使用直观的文件系统路由将每个文件映射到路由。新版本的 Next.js 仍然支持 Pages Router,但我们建议迁移到新的 应用路由 以利用 React 的最新功能。

¥Before Next.js 13, the Pages Router was the main way to create routes in Next.js. It used an intuitive file-system router to map each file to a route. The Pages Router is still supported in newer versions of Next.js, but we recommend migrating to the new App Router to leverage React's latest features.

对于使用 Pages Router 的现有应用,请使用本文档的这一部分。

¥Use this section of the documentation for existing applications that use the Pages Router.