RSC observability
What you need to know
RSC observability means checking what the framework sends and how the browser behaves, without relying on undocumented internal payload formats. Initial HTML, the RSC payload and interactive client JavaScript have distinct roles.
By the end, you can: inspect payload and hydration evidence; distinguish public API from internals.
Share one memoized server function
// lib/public-book.ts — server moduleimport 'server-only';import {cache} from 'react';export const getPublicBook=cache(async (id:string)=>{ const books=[{id:'fern',title:'Fern walk'}]; return books.find(book=>book.id===id) ?? null;});Expected behavior: Two Server Components calling the same function with fern in one render request can share work under React’s cache contract. A new request has its own memoization context.
How it works
On a direct request, Next.js uses server-rendered component output and client component instructions to produce an initial HTML view; the browser reconciles the tree using RSC data and activates interactive components through hydration. Client navigation can fetch or reuse RSC data and update the existing interface rather than load a new document. Inspect the document response, browser network activity and a real button interaction; a static HTML view cannot prove hydration. Do not build test assertions around private Flight markers, internal URL parameters or exact chunk encoding. Use stable user-visible text, public APIs and observable requests. React's cache can reduce repeated server-render work within a request when callers use the same memoized function with matching arguments. Define the wrapper at module scope and share it. Creating a second cache wrapper creates a separate memoized function. Primitive arguments can match by value, but two distinct object references with identical fields need not share a result; use a stable identifier when appropriate. This is not a persistent Next.js data cache or an authorization boundary; errors may also be memoized. Verify request boundaries and origin counts with an actual production framework runtime before claiming deduplication.
Observe an actual interactive outcome
// app/Count.tsx'use client';import {useState} from 'react';export default function Count(){ const [count,setCount]=useState(0); return <button onClick={()=>setCount(c=>c+1)}>Read count: {count}</button>;}Expected behavior: Initially Read count: 0. After browser hydration and one click, Read count: 1. This is an expected browser assertion, not an observed result.
Common mistake
Finding a title in the HTML does not prove that the button is interactive or that private props are absent from later navigation responses. Inspect the actual browser and server output separately. Do not test private wire format details as public contracts.
Practice and verification
In a reviewed production build, capture initial HTML, record an ordinary Link navigation, test the count button, and inspect payloads for a synthetic forbidden marker. Add a server read counter and compare repeated calls within one request versus separate requests.
Scope: App Router, proposed Next.js 16.x and React 19, Cache Components disabled. Framework snippets are staged, not executed; local policy, SQLite and HTTP transport evidence is separate. Exact patched dependencies and platform contracts are pending.
Further reading: Components · React Cache · React Client · Production