Session Plan
Next.js
Why Next.js?
Server-Side Rendering (SSR) and Static Site Generation (SSG)
Explanation of SSR and SSG
Use cases for SSR and SSG
Server Components for SSR
When to Use Client vs. Server Components?
Introduction to Next.js App Router
Overview of Next.js routing system
Advantages over traditional client-side routing
Basic Next.js Routing
Next.js Router Hooks
Understanding the useParams Hook
useParams HookUnderstanding the useSearchParam Hook
useSearchParam HookWorking With the useRouter Hook
useRouter HookAdvanced: Server Functions & API Routes
Server Functions
Server Components
Server Actions
API Routes
Vercel
Introducing Vercel & Good Use Cases
Connecting a GitHub Repository With Vercel
Limitations of Vercel
Exercises
1. Installing Next.js and Getting Started
2. Create a Page That Renders the NASA Astronomy Picture of the Day (With Caption) using Server Side Rendering
3. Dynamic Rendering With useEffect
useEffectCreate a component that fetches NASA Mars Rover Photos from an API (with caption)
Use useEffect to Fetch Data on Component Mount
useEffect to Fetch Data on Component MountRender Fetched Data in the Component
4. Routing and Navigation Exercise
Create a Blog Website With Dynamic Routes to Different Blog Posts
Create a Page That Displays a NASA EPIC Image on a Different Date Depending on a Query String Parameter Received
5. Client vs. Server Exercise
Docs
6. Server Functions (or Server Actions) & API Routes Exercise
Server Functions (or Server Actions)
Trying out API Routes
Last updated