Skip to main content

One post tagged with "rsc"

View All Tags

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

· 24 min read
Pere Pages
Software Engineer
A running Next.js app sending requests to its server and getting streamed answers back: RSC payloads for reads, Server Action POSTs for writes

When you first open a Next.js app, the browser downloads a document: a page of HTML (HyperText Markup Language). The browser reads it, and then React makes it interactive (this step is called hydration). After that, open the Network tab of your browser's developer tools and you'll see that the app never asks for a document again. Instead you see a small, steady number of unusual requests. Some are GETs that return something that isn't HTML. Others are POSTs to the page you're already on, and their answer arrives in pieces. Those POSTs look the strangest, and they're what this post explains.