App Router
Next.js Notes notes about App Router
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
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
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.
Choose an approach and configure the project
Next.js App Router vs Pages Router: Whether—and How—to Migrate
Keep stable Pages Router routes, and move routes selectively when App Router layouts, Server Components, or data fetching solve a real problem.
Test and improve application performance
Next.js vs React Performance: How to Run a Fair App Comparison
Compare matched apps and explicit rendering modes, then report response, paint, and interaction measurements under repeatable conditions.
Load, change, and refresh data
Build and Call an API Endpoint with Next.js App Router Route Handlers
Create a GET and POST endpoint at /api/todos, call it with fetch, and check its JSON responses and status codes.
Secure, deploy, and maintain an application
How to Check Whether Your Next.js Version Is Vulnerable—and Fix It
Check the version your project resolves, compare it with the advisory for the specific issue, and verify the fix after deployment.










