# react-on-rails-rsc

[![npm version](https://img.shields.io/npm/v/react-on-rails-rsc.svg)](https://www.npmjs.com/package/react-on-rails-rsc)
[![npm next](https://img.shields.io/npm/v/react-on-rails-rsc/next.svg?label=next)](https://www.npmjs.com/package/react-on-rails-rsc?activeTab=versions)
[![license](https://img.shields.io/npm/l/react-on-rails-rsc.svg)](https://www.npmjs.com/package/react-on-rails-rsc)

[**npm: react-on-rails-rsc**](https://www.npmjs.com/package/react-on-rails-rsc)

This package provides React Server Components (RSC) support for the [`react-on-rails-pro`](https://github.com/shakacode/react_on_rails_pro) Ruby gem. 

⚠️ **IMPORTANT: This package is for internal use only** ⚠️

This package is not intended to be used directly by end users. It is designed to be used internally by [`react-on-rails-pro`](https://github.com/shakacode/react_on_rails_pro) npm package and ruby gem.

## Usage

Do not use this package's APIs directly in your application code. Instead use [`react_on_rails`](https://github.com/shakacode/react_on_rails) and [`react-on-rails-pro`](https://github.com/shakacode/react_on_rails_pro) gems and npm packages APIs to render or stream React Server Components.

## Testing Unreleased Builds

If a downstream app needs to test a `react-on-rails-rsc` fix before an npm
release, see [`docs/consuming-unreleased-builds.md`](docs/consuming-unreleased-builds.md)
for the yalc, canary publish, throwaway dist branch, and version-pairing
workflows.

## Package Contents

This package provides internal tooling for React Server Components integration:
- Webpack plugin for manifesting client components
- Webpack loader for bundling server components
- Client/server utilities for RSC rendering

## Versioning

The package `major.minor` tracks the React runtime line it ships or requires.
See [`docs/versioning.md`](docs/versioning.md) for peer dependency,
prerelease, dist-tag, and runtime-strategy policy.

## Releasing

Release this package from `main` using the changelog-driven workflow in
[`docs/releasing.md`](docs/releasing.md). Run `yarn release:dry-run` before
`yarn release`.

## Compatibility Policy

The package peer dependencies are the current source of truth for supported
React and webpack ranges. CI also runs a focused compatibility matrix covering
React 19.0.4 and 19.2.x, Node.js 20 and 22, webpack 5.59.0 and latest 5.x, and
rspack latest 1.x. A weekly React canary job is signal-only and is allowed to
fail while upstream canary APIs move; review its GitHub Actions summary for
early warnings.

A formal versioning policy is tracked in
[#70](https://github.com/shakacode/react_on_rails_rsc/issues/70).

## Support

For questions about React Server Components:
- Visit [React on Rails Pro documentation](https://www.shakacode.com/react-on-rails-pro/docs/)
- Visit [React on Rails documentation](https://www.shakacode.com/react-on-rails/docs/)
- Open issues in the [`react-on-rails-pro`](https://github.com/shakacode/react_on_rails_pro/issues) repository
