Skip to main content

7 posts tagged with "nextjs"

View All Tags

How a running Next.js app talks to the server: RSC fetches and Server Actions

· 19 min read
Pere Pages
Software Engineer
A running Next.js app exchanging RSC payloads and Server Action POSTs with the server over a streamed connection

The first load of a Next.js app is a document — HTML down the wire, parsed, hydrated. But once the app is interactive, open your Network tab and you'll notice it never asks for a document again. Instead you see a trickle of odd little requests: some are GETs that return something that isn't HTML, and some are POSTs to the page you're already on, streaming a response back. Those POSTs are the part that looks weird, and they're the reason this post exists.

From URL bar to interactive: what really happens when a Next.js app boots

· 23 min read
Pere Pages
Software Engineer
Diagram of a browser request travelling to a Next.js server and back to an interactive page

You type a domain, hit Enter, and a second later you're clicking around a working app. That second is deceptively busy. Between the keystroke and the first working button there's a DNS lookup, a couple of cryptographic handshakes, a streamed HTML document, a fan of parallel downloads, a serialized React tree, and a reconciliation pass that stitches JavaScript onto server-rendered markup without throwing any of it away.

Frontend Debugging Cookbook — React SPA vs. Next.js

· 12 min read
Pere Pages
Software Engineer
Flat-vector split scene: a browser window on the left wired by tracing lines to a server stack and terminal on the right, with a magnifying glass and a small bug — the two runtimes you debug across.

Debugging a React single-page application (SPA) and debugging a Next.js App Router app are different sports, and the whole difference comes down to one thing: where your code runs. This is a recipe-oriented reference for the questions that keep coming up — where your logs went, how to see backend calls, how to observe React Server Components (RSC), and which logging options and tools are worth reaching for.

How Vercel's Infrastructure Actually Works Behind a Next.js App

· 16 min read
Pere Pages
Software Engineer
Diagram of Vercel's edge network routing requests to a Next.js app

You write next build, run vercel deploy, and a URL comes back. But between that command and the response your users get, there's a whole distributed system — build pipelines, an edge network, serverless and edge functions, caches at multiple layers. This post opens the box and walks through what Vercel actually does with a Next.js app.