All notes
Every note published on Next.js Notes
Render UI across server and client boundaries
Build a Next.js Server Component, Pass Props, and Show the Current Path
Render a posts list in an App Router Server Component, then add a small Client Component to display the current pathname.
Test and improve application performance
Turbopack in Next.js 16: What Changes in Development and Builds
Check route compilation, edit-time reuse, restart caching, and the build caching described in the Next.js 16.3 preview as separate behaviors.
Render UI across server and client boundaries
Does a Next.js UI Library Need 'use client'? Check the Component Boundary
In the App Router, keep static UI on the server and add a focused client boundary for library components that need interactivity or context.
Render UI across server and client boundaries
Show a Safe Fallback for Next.js App Router Server Component Errors
Put an error.tsx boundary in the products segment to replace a failed page with safe copy and a retry button.
Load, change, and refresh data
Fetch Build-Time Data with `getStaticProps` in a Pages Router Page
Use `getStaticProps` to fetch posts before requests arrive and pass them to a Pages Router page as serializable props.
Load, change, and refresh data
Why Is My Next.js App Router Data Still Stale? Find the Cache Layer
Identify whether stale data comes from a cached fetch, rendered output, or a CDN response before choosing how to refresh it.
Load, change, and refresh data
Does Next.js Cache Images? Fix a Stale `next/image`
Find the image response your browser displays, check whether its source is current, then choose a freshness strategy for the cache that serves it.
Load, change, and refresh data
Fetch API Data in a Next.js Client Component with TanStack Query
Use TanStack Query to request posts from an existing API endpoint and render pending, error, empty, and populated states.
Add an MDX Page to an Existing Nextra Documentation Starter
Add an MDX file to a Nextra starter’s pages directory, register its filename in the starter’s navigation metadata, and check both the URL and rendered navigation.
Test and improve application performance
Set Up Vitest in a Next.js Pages Router App—and Know Its Testing Boundary
Add a Vitest component test for a Pages Router page, then distinguish its heading assertion from a route-level check.










