Rendering is a two-stage process of transforming component logic (JSX/TSX) into a Data Representation of the UI (Virtual DOM or RSC Payload), which is then reconciled to produce the final Host Output (Actual DOM or HTML).
Before any rendering occurs on the server or client, the code must be processed to be environment ready.
.tsx or .jsx files into standard JavaScript. Specifically, it transforms JSX tags into React.createElement() function calls.<div>Hello</div> becomes React.createElement('div', null, 'Hello').Bundling & Code Splitting:
In traditional React, the browser is the sole constructor of the UI. The server is merely a file provider.
document.createElement browser APIs to build the Real DOM from scratch. This is known as the Initial Mount.The user experiences a white screen until the bundle is downloaded and the browser finishes the construction of the DOM. This also makes SEO difficult as search engines initially see an empty page.
In Next.js, rendering is a distributed process. The server handles converting logic to UI data so the browser can focus on immediate display.
The timing of the rendering pipeline depends on whether the route is static or dynamic:
cookies()).The server executes the component tree to produce two distinct outputs:
The component tree is converted into a serialized string called the RSC Payload. This format is designed to be streamable. If a component is wrapped in <Suspense> and is awaiting data (async/await), the server sends the finished parts of the payload first. As the data resolves, the remaining payload is "streamed" down the same connection to fill in the UI.
The Paradigm Shift: In React JS, the browser receives a Recipe and must cook the meal. In Next.js, the server pre-cooks the meal; the browser receives the Food (HTML) and the Service Manual (RSC Payload) on how to keep it fresh (Hydration).