EdgeCases Logo
27 articles

Next.js Edge Cases

App Router, RSC, caching, and deployment gotchas

Start Here

Essential reads to understand the key concepts and patterns.

More Articles

Deep·7 min

Next.js Middleware Performance: What Runs at the Edge vs What Doesn't

Next.js middleware runs in Edge Runtime with strict limitations. Understanding what triggers Node.js fallback prevents performance regressions and function failures.

Surface·6 min

next.config.js Optimization Flags

Experimental features that boost production performance—and the ones to avoid

Expert·11 min

Next.js RSC Serialization Limits

What can (and cannot) cross the server-client boundary in React Server Components

Deep·8 min

Next.js Route Handlers vs Server Actions

Use Server Actions for mutations called from your React components. Use Route Handlers when external clients need to call your API.

Deep·9 min

Next.js Server Actions Error Handling Patterns

useActionState, error boundaries, and validation failures all interact in Server Actions. Learn patterns for robust error handling without confusing UX.

Deep·9 min

Next.js Server Actions Error Handling Patterns

useActionState, error boundaries, and validation failures all interact in Server Actions. Learn patterns for robust error handling without confusing UX.

Surface·6 min

Vercel Firewall & Rate Limiting

Built-in WAF protection without external services or complex middleware configurations

Deep·9 min

Next.js Middleware Performance

Middleware runs on every request - make it fast. Learn Edge vs Node runtime trade-offs, header mutation pitfalls, and rewrite rule optimization.

Deep·9 min

Vercel Cron Jobs Gotchas

Vercel Cron Jobs have strict timeout limits and no execution guarantees. Learn timeout handling, missed execution recovery, and monitoring strategies.

Deep·8 min

Next.js Cache Components Deep Dive

How the new "use cache" directive fundamentally changes server component performance optimization strategies beyond traditional fetch() caching

Deep·7 min

Server Components Data Fetching Patterns

Parallel fetching with Promise.all, React.cache for deduplication, and Suspense boundaries to avoid request waterfalls in Server Components.

Expert·8 min

Partial Prerendering: Streaming + Static Shell

Static shell plus dynamic streaming slots—how Partial Prerendering in Next.js 16 delivers instant initial loads with fresh data.

Surface·6 min

Vercel Blob Storage: When It Makes Sense (and When It Doesn't)

Average-based billing, 15-minute sampling, and when Vercel Blob beats S3/R2—and when it doesn't.

Deep·7 min

Neon on Vercel: The Connection Pooling Maze

Edge can't do TCP, serverless exhausts pools—here's when to use pooler endpoint vs @neondatabase/serverless vs raw WebSocket.

Expert·8 min

Vercel Billing Demystified: Edge Requests, Function Duration, and ISR Costs

How $20/month becomes $200: Edge Requests, Function duration, ISR costs, regional multipliers, and the billing gotchas Vercel doesn't highlight.

Surface·6 min

ISR Build Time Reduction: From Minutes to Seconds

Stop pre-rendering 500 pages at build time—use ISR to generate on-demand and cut deploys from minutes to seconds.

Expert·8 min

Vercel Image Build Bottleneck: CDN Migration and OG Generation

Images in /public cost build time even with 'on-demand' optimization. Move to external CDN and generate OG images at runtime for 2-3 minute savings.

Deep·6 min

Prisma 7: The Rust-Free Future

Wasm engine replaces Rust binary—90% smaller bundles and zero cold starts

Surface·8 min

Next.js 16: Dynamic by Default, Turbopack Stable, proxy.ts

Explicit caching with 'use cache', Turbopack as default bundler, and proxy.ts for Node.js runtime clarity

Deep·8 min

Turbopack: Next.js 16 Default Bundler (2-10× Faster)

Rust-powered bundler with incremental compilation, file system caching, and production parity with Webpack

Deep·8 min

proxy.ts: Node.js Runtime for Next.js Request Interception

Full filesystem and npm package access in middleware—proxy.ts replaces middleware.ts with Node.js runtime

Deep·8 min

Next.js 16 Incremental Prefetching: Smart Route Preloading

Layout deduplication, viewport-based cancellation, and interaction prioritization reduce redundant requests