react-server-dom-turbopack provides the foundational bindings for integrating React Server Components (RSC) with Turbopack, a high-performance build system. It is specifically designed as a low-level API for meta-frameworks (e.g., Next.js) to manage the serialization and deserialization of RSC payloads between server and client, enabling features like streaming and Server Actions. This package is not intended for direct consumption by application developers, but rather as an internal dependency within frameworks. The current stable version is 19.2.5, aligning with React's release cycle, which sees frequent updates, often including security hardening and performance improvements related to RSC and Server Actions. Its key differentiator is its tight integration with Turbopack for optimal performance in environments leveraging that build tool.
npm install react-server-dom-turbopackVerified import paths — ran on the pinned version, not inferred.
Illustrates the conceptual usage of `renderToPipeableStream` on the server and `createFromReadableStream` on the client, as a meta-framework would implement it. This is NOT for direct application use.
If you are developing a React application, use a framework that supports React Server Components (like Next.js) and follow its documentation. Do not import `react-server-dom-turbopack` directly into your application code.
Regularly update your meta-framework (e.g., Next.js) to its latest stable release to ensure you have the most up-to-date security patches and performance improvements for React Server Components.
Framework developers must ensure they import from the correct environment-specific paths: `react-server-dom-turbopack/server` for server-side code and `react-server-dom-turbopack/client` for client-side code.
Ensure you are using a meta-framework that handles this integration. If you are a framework developer, confirm your build system correctly resolves `react-server-dom-turbopack/client` or `react-server-dom-turbopack/server` based on the target environment.
Verify that `react` and `react-dom` peer dependencies are installed and compatible with version 19.x. Also, ensure your build toolchain (Turbopack) is configured to correctly process and bundle this module for the client environment.