Mô tả

Update: this course has now been revised to include the new App Router features, made stable in May 2023 with Next.js v13.4. The first half of the course covers the new App Router, while the remaining half covers the older — but still supported — Pages Router. All the examples work with the latest Next.js v14 as well.

Dubbed as “The React Framework for the Web”, Next.js makes it easy to build highly optimized web applications by server-side rendering React components.

This course will guide you through learning Next.js by developing a complete project step by step.

Part I will show you how to use Next.js as a Static Site Generator, prerendering all your pages to static HTML, CSS, and JavaScript.

This will teach you fundamental Next.js concepts such as file-based Routing, Prerendering, React Server Components, the differences between Server and Client Components, and how to fetch data in Server Components.

It will also use the popular Tailwind CSS framework for styling, demonstrate how to embed Custom Fonts into your application, and how to make your pages more SEO-friendly with metadata.

The Deployment section will present you the various options for running your application in production, from using a fully-managed platform like Vercel to performing a Static Export that can be uploaded to any web server.

Part II will show you how to use Next.js as a Full-Stack Framework, enabling features such as Dynamic Rendering, Time-based Revalidation, and On-demand Revalidation.

It will use a Headless CMSStrapi — to store data, and demonstrate how to call its REST API from the Next.js app, and the various options for updating the frontend pages when the data in the CMS changes.

It will also cover Image Optimization, showing how Next.js can convert and resize your images on-demand, and enable lazy-loading by the browser.

Finally, it will demonstrate how to integrate third-party UI components in your app, and when it can still make sense to use Client-Side Data Fetching.

You can follow the example using either JavaScript or TypeScript. The full source code is provided, with an easy way to see the changes made in every lecture.

Bạn sẽ học được gì

Develop web applications with Next·js

Style components with Tailwind CSS

Build fully static websites or full-stack applications

Fetch data from a remote API such as a Headless CMS

Yêu cầu

  • Familiarity with modern web development: HTML, CSS, JavaScript, npm
  • Familiarity with React, including the useState and useEffect hooks

Nội dung khoá học

28 sections

Introduction

3 lectures
App vs Pages Router
04:14
Required Tools
00:15
Updates and Corrections
00:37

[app] Routing and Layouts

8 lectures
Project Overview
02:57
Creating a Next.js Project
08:10
Home Page
04:39
Source Code
04:39
TypeScript
06:13
Page Routes
06:08
Exercise: Add More Pages
03:28
Nested Layouts
06:19

[app] Rendering and Navigation

7 lectures
Prerendering
08:44
React Server Components
08:57
Dev vs Production Server
07:40
Link Component
06:23
Prefetching
05:37
Layout and Navigation
03:57
Exercise: Review Links
01:43

[app] Styling

6 lectures
Styling Solutions
06:52
Installing Tailwind CSS
04:23
Layout Styling
07:04
Color Palette
05:40
Heading Component
03:42
Import Alias
04:03

[app] Assets and Fonts

6 lectures
Static Assets
04:47
Image Cards
04:47
Font Optimization
06:27
Custom Tailwind Font
05:29
Exercise: Custom Default Font
04:52
Responsive Design
07:34

[app] Loading Data

10 lectures
Reading Files
05:19
Rendering Markdown
04:32
Tailwind CSS Typography
04:16
Front Matter
04:39
Data Layer Separation
03:48
Dynamic Routes
04:47
Listing Files
06:04
Rendering Arrays
02:53
Static Generation for Dynamic Routes
08:06
Exercise: Featured Review
03:31

[app] Metadata

4 lectures
Title and Meta Tags
04:20
Title Template
03:59
Dynamic Metadata
02:46
Icon and Metadata Files
04:03

[app] Client Components

5 lectures
Share Link Button
03:46
Client Components
05:10
Component State
05:07
Nested Client Components
05:32
Heroicons
02:56

[app] Deployment

5 lectures
Deployment Options
01:55
Deploying to Vercel
05:21
Static Export
04:02
Static Hosting
02:26
Self-Hosting
00:53

[app] Headless CMS

13 lectures
Project Phase 2
05:17
Starting Code
00:18
Strapi Overview
07:31
Preloaded CMS Instance
04:12
Fetch API
07:19
Strapi API Parameters
07:03
Get Reviews From CMS - Step 1
04:22
Get Reviews From CMS - Step 2
04:00
Get Review From CMS - Step 1
04:40
Get Review From CMS - Step 2
03:41
Refactoring: Fetch Reviews
04:44
Get Slugs From CMS
04:21
Static Build with CMS Data
02:42

[app] Image Optimization

7 lectures
ESLint
05:30
Next Image Component
04:16
Image Conversion
06:01
Lazy Loading and Priority
06:58
Exercise: Home Images
04:44
Subtitles
03:31
Alternative Image Loaders
05:11

[app] Dynamic Rendering and Revalidation

8 lectures
Dynamic Params
09:13
Dynamic Rendering
07:03
Page Not Found
04:51
Background Revalidation
08:44
Fetch Cache and Revalidation
06:10
Webhook Route Handler
08:45
On-Demand Revalidation
07:17
Rendering Strategies Comparison
07:55

[app] Pagination

6 lectures
Query String Parameters
06:39
Pagination with Strapi
04:48
Page Count
04:32
Exercise: Pagination Bar
08:21
Search Params and Dynamic Rendering
09:10
Exercise: usePathname
06:01

[app] Client-Side Data Fetching

10 lectures
Third-Party Components
05:26
Client-Only Rendering
09:09
Combobox Styles
06:54
Combobox Events
04:50
Server to Client Props
08:11
Client-Side Fetch
07:05
Search Route Handler
04:54
Calling Route Handlers
04:01
Cancelling Requests
04:54
Debouncing Requests
05:43

[app] Deploying with External Services

6 lectures
Environment Variables
07:24
Configurable Image Source
06:13
Strapi Cloud
06:55
Strapi URL for Testing
00:50
Deploying with Environment Variables
06:21
End of the App Router Part
00:39

[pages] Getting Started

5 lectures
Next Blog: Overview
02:21
Next.js Project Setup
06:58
Source Code
04:15
Pre-rendering
06:03
Development vs Production Server
07:57

[pages] Routing and Navigation

5 lectures
Adding New Pages
03:18
Next Link Component
04:51
Shared NavBar Component
04:46
Custom App Component
05:05
Next Head Component
03:20

[pages] Styling

3 lectures
Global Styles
04:43
Component Styles with Styled JSX
06:40
Images and Other Assets
04:43

[pages] Loading Data

12 lectures
First Post Page
02:43
Markdown Syntax
02:24
getStaticProps Function
03:59
getStaticProps in Production Mode
06:54
Reading a File
03:44
Lib Module
03:33
Rendering Markdown
06:19
Front Matter
04:52
Dynamic Route and getStaticPaths
08:09
Listing Files in a Folder
04:31
Listing Posts
05:28
Dynamic Routes in Production Mode
03:32

[pages] Client-side Functionality

6 lectures
ThemeSwitch Component
06:18
Dark Mode Styles
04:54
DarkTheme Component
04:41
Hydration
06:45
Saving Preferences to Local Storage
05:45
Feature Detection
05:22

[pages] Deployment

5 lectures
Deployment Options
04:27
Vercel Platform
05:50
Exporting as a Static Website
04:32
Linux Server with Nginx
04:29
Linux Server with Node.js
05:55

[pages] Next Shop: Setup

10 lectures
Next Shop: Overview
02:19
Create Next App
05:31
TypeScript Support
08:09
Source Code
00:09
Tailwind CSS Setup
05:40
Utility-First CSS
08:04
High-level Architecture
07:31
Strapi Headless CMS
10:34
Note: Strapi Version
01:16
Backend Setup
04:26

[pages] Data Fetching

18 lectures
Displaying Products
04:17
Fetching Data Server-side
04:42
Fetching Data Client-side
06:52
Incremental Static Regeneration
09:10
Server-side Rendering
05:07
API Routes
06:21
Calling API Routes
03:29
Choosing a Data Fetching Strategy
07:28
Product Page Links
02:54
Product Page
05:45
Regenerating Product Pages
05:03
On-demand Revalidation
09:44
Fallback: Blocking
05:16
Fallback and Page Not Found
05:59
Shared fetchJson function
04:05
Custom Error Class
04:02
Fallback and Backend Unavailable
1 question
Environment Variables
06:06

[pages] Responsive Design and Image Optimization

5 lectures
Product Card
06:09
Responsive Grid
05:10
Product Images
02:49
Next Image Component
07:08
Responsive Product Page
05:41

[pages] Authentication

13 lectures
Strapi Authentication
06:29
Shared Page Component
05:29
Sign In Form
06:20
Form State and Validation
04:21
Sign In API Request
04:39
Error and Loading States
06:44
API Route with POST
06:08
Login API Route
03:58
Setting a Cookie
06:06
NavBar with Authentication
04:49
User API Route
06:08
Loading User Data
06:05
Signing Out
05:11

[pages] React Query

7 lectures
Why React Query
04:59
useQuery Hook
09:54
useUser Custom Hook
03:36
useMutation Hook
07:12
Updating the Query Cache
04:33
useSignIn Custom Hook
07:11
useSignOut Custom Hook
05:17

[pages] Shopping Cart (Exercises)

9 lectures
Cart Items Collection
06:10
Cart Page
02:37
Cart API Route
04:05
Fetching Cart Items
02:03
Displaying Cart Items
05:57
POST Cart Handler
04:21
Add to Cart Widget
03:19
Add to Cart Mutation
02:48
Wrap Up
05:12

Conclusion

1 lectures
Congratulations and Bonus
00:20

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.