Review patched framework integration and serialization
Cross the boundary with an explicit data contract
An RSC boundary transfers supported values, not arbitrary in-memory objects. The supported format is broader than JSON: React documents primitives, certain built-in collections and dates, plain objects, JSX values, promises and Server Function references in relevant contexts. An arbitrary closure or class instance is not a general transferable prop. The argument/return rules for Server Functions are not identical to the props rules; consult the exact documentation. A small explicit data-transfer object (DTO) is a useful default, not a claim that React only supports JSON. Anything transmitted to the client can be inspected, including values never shown on screen. Do not pass complete database objects, credentials or private notes just because the visible component ignores them.
export function toPublicBook(record){ if(!record || typeof record.id!=='string' || typeof record.title!=='string' || !Number.isInteger(record.pages) || record.pages<1) throw new TypeError('Invalid catalogue record'); return {id:record.id,title:record.title,pages:record.pages};}Given {id:"b1", title:"Moss atlas", pages:84, ownerId:"demo-owner", privateNote:"synthetic"}, the function returns only id, title and pages. The output is a new plain object with a deliberately narrow interface. This projection is not authorization; the server must decide whether the caller is allowed to see a record before projecting it. Avoid spreading the entire record into a client prop. Do not rely on minification or experimental taint checks as a replacement for data minimization.
Start a resource on the server and read it in a client component
import React,{Suspense} from 'react';import {toPublicBook} from './c40-l03-s03.mjs';import BookDetails from './c40-l03-s08.jsx';async function loadPublicBook(){return toPublicBook({id:'b1',title:'Moss atlas',pages:84,ownerId:'demo-owner',privateNote:'synthetic'});}export default function BookPage(){ const bookPromise=loadPublicBook(); return <main><h1>Book details</h1><Suspense fallback={<p role="status">Loading details...</p>}><BookDetails bookPromise={bookPromise}/></Suspense></main>;}The promise starts in server evaluation rather than being created from scratch on every client render. The transport can represent the pending resource in a supported integration. The next client component reads the resolved value under Suspense. The fixed mock resolves quickly; the fallback might never appear. In a real app, use the framework’s data lifetime and caching rules, and avoid sharing user-specific resources between requests.
'use client';import React,{use} from 'react';export default function BookDetails({bookPromise}){ const book=use(bookPromise); return <article><h2>{book.title}</h2><p>{book.pages} pages</p></article>;}After resolution, the interface should show Moss atlas and 84 pages. Suspense handles waiting; a rejected promise goes to an appropriate error boundary. Do not catch use inside a try/catch. This paired example requires React 19 and a compatible RSC transport; syntax transformation does not prove that the promise is serialized correctly. In an ordinary client-only app, use an established data-loading mechanism instead.
Review integration security before execution
React 19 documents Server Components and Server Functions as application-facing capabilities; the integration APIs used by framework and bundler maintainers have different compatibility guarantees. Select matching exact supported releases, lock dependencies, check React and the selected framework security advisories and verify the installed dependency tree, including react-server-dom packages used by the integration. Official React advisories published in December 2025 and updated with subsequent findings describe serious RSC vulnerabilities including remote code execution, denial of service and source exposure. RSC support itself may be relevant even without custom Server Functions. Do not run an affected release or assume updating react alone fixes an integration package. No exact safe patch is asserted here because no framework or lockfile was available for review. Keep framework routing, cache invalidation and deployment instructions in their own tracks. Use an isolated loopback lab only after approval; inspect client bundles and serialized payloads for synthetic private-field markers, test denied mutations and reject unexpected data. No exploitation or public test is required. Practice: prepare a release gate for the paired example and record which checks remain unexecuted.