这里十分推荐官方的教程,虽然是英文,但是都很清晰明了,能够让你很快的学习到nextjs的核心知识,从一个页面开始了解到整个框架的组成结构。
官方教程
根据官方教程,最终你会搭建一个金融仪表盘,包括:
- 公共主页;
- 登录页面;
- 受身份验证保护的仪表盘页面;
- 用户增删查改的能力; 同时,页面还会配有相应的数据库。到课程结束时,你将掌握构建全栈 Next.js 应用所需的基本技能。
这是本课程中你将学习到的功能概述:
- Styling: The different ways to style your application in Next.js.
样式化: 在 Next.js 中对应用程序进行样式化的不同方法。 - Optimizations: How to optimize images, links, and fonts.
优化:如何优化图片、链接和字体。 - Routing: How to create nested layouts and pages using file-system routing.
路由:如何使用文件系统路由创建嵌套布局和页面。 - Data Fetching: How to set up a Postgres database on Vercel, and best practices for fetching and streaming.
数据获取:如何在 Vercel 上设置 Postgres 数据库,以及获取和流式传输的最佳实践。 - Search and Pagination: How to implement search and pagination using URL search params.
搜索与分页:如何使用 URL 查询参数实现搜索和分页。 - Mutating Data: How to mutate data using React Server Actions, and revalidate the Next.js cache.
数据变更:如何使用 React Server Actions 变更数据,并重新验证 Next.js 缓存。 - Error Handling: How to handle general and
404
not found errors.
错误处理:如何处理一般错误和404
未找到错误。 - Form Validation and Accessibility: How to do server-side form validation and tips for improving accessibility.
表单验证和无障碍性:如何进行服务器端表单验证及提高无障碍性的建议。 - Authentication: How to add authentication to your application using
NextAuth.js
and Middleware.
认证: 如何使用NextAuth.js
和中间件为您的应用程序添加认证。 - Metadata: How to add metadata and prepare your application for social sharing.
如何添加元数据并为社交分享准备您的应用程序