Building Your Application
Next.js 提供了构建灵活的全栈 Web 应用程序所需的基础构建块。“构建你的应用程序”中的指南解释了如何使用这些功能以及如何自定义应用程序的行为。
这些章节和页面按照从基础到高级的顺序组织,因此你可以在构建 Next.js 应用程序时循序渐进地学习。但是,你也可以按任意顺序阅读,或者直接跳到适用于你的使用场景的页面。
如果你是 Next.js 新手,我们建议你从 路由、渲染、数据获取 和 样式 部分开始,因为这些部分介绍了 Next.js 和 Web 的基本概念,可以帮助你入门。然后,你可以深入研究其他部分,如 优化 和 配置。最后,当你准备好时,可以查看 部署 和 升级 部分。
Routing
Learn the fundamentals of routing for front-end applications with the Pages Router.
Rendering
Learn the fundamentals of rendering in React and Next.js.
Data Fetching
Next.js allows you to fetch data in multiple ways, with pre-rendering, server-side rendering or static-site generation, and incremental static regeneration. Learn how to manage your application data in Next.js.
Styling
Learn the different ways you can style your Next.js application.
Optimizations
Optimize your Next.js application for best performance and user experience.
Configuring
Learn how to configure your Next.js application.
Testing
Learn how to set up Next.js with three commonly used testing tools — Cypress, Playwright, Vitest, and Jest.
Authentication
Learn how to implement authentication in Next.js, covering best practices, securing routes, authorization techniques, and session management.
Deploying
Learn how to deploy your Next.js app to production, either managed or self-hosted.
Upgrading
Learn how to upgrade to the latest versions of Next.js.