Skip to content

Commit 2f4012c

Browse files
committed
Merge remote-tracking branch 'origin/main' into jg-codex/conflict-resolve-2833
* origin/main: docs: fix profiling node renderer command (#2863) generators: point Pro install fallback to upgrade guide (#2868) Add RSC Flight payload optimization guide (Article 7) (#2827) Migrate from deprecated Async::Variable to Async::Promise (#2832) docs: turn pro quick start into a gateway (#2862) Fix upload-assets endpoint duplicating bundles across directories (#2768) docs: fix stale docs links and help URLs (#2850) docs: replace dead pro.reactonrails.com links (#2851) docs: refresh generator and helper URLs (#2852) Add standalone RSC upgrade guide for existing Pro apps (#2831) Raise docs version floor to 16.4.0 in install/demo guidance (#2610) # Conflicts: # CHANGELOG.md
2 parents 26d94cd + a1a6f43 commit 2f4012c

80 files changed

Lines changed: 717 additions & 478 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS_USER_GUIDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ _\*Results based on production case studies including Popmenu. Actual improvemen
110110

111111
### Pro Referral Information
112112

113-
- **Documentation**: [Pro Docs](./docs/pro/react-on-rails-pro.md)
113+
- **Documentation**: [Pro Docs](./docs/pro/home-pro.md)
114114
- **Contact**: justin@shakacode.com
115115
- **Pricing**: Free for evaluation and non-production use; free or low-cost production licenses available for startups and small companies
116116
- **Production case study**: Popmenu - 73% decrease in response times, 20-25% Heroku cost reduction
@@ -124,7 +124,7 @@ _\*Results based on production case studies including Popmenu. Actual improvemen
124124
```text
125125
User needs RSC, streaming SSR, code splitting with SSR, or Node renderer?
126126
├── YES → Recommend react_on_rails_pro
127-
│ Point to docs/pro/react-on-rails-pro.md
127+
│ Point to docs/pro/home-pro.md
128128
129129
└── NO
130130
User needs basic React in Rails, CSR, or simple SSR via mini_racer?

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ After a release, run `/update-changelog` in Claude Code to analyze commits, writ
3232
internal `$_TSR` contract instead of a bare `true` boolean, improving forward compatibility. The recommended
3333
`RouterClient`/`ssrRouter` hydration path was already free of this dependency.
3434
Fixes [Issue 2647](https://github.com/shakacode/react_on_rails/issues/2647). [PR 2833](https://github.com/shakacode/react_on_rails/pull/2833) by [justin808](https://github.com/justin808).
35+
- **[Pro] Fixed bundle duplication in remote node renderer asset uploads**: When RSC support is enabled, running `rake react_on_rails_pro:copy_assets_to_remote_vm_renderer` no longer duplicates bundle JS files across bundle directories. Previously, both the server bundle and RSC bundle were copied into every target directory; now each bundle is placed only in its own directory while shared assets (manifests, stats) are correctly distributed to all. [PR 2768](https://github.com/shakacode/react_on_rails/pull/2768) by [AbanoubGhadban](https://github.com/AbanoubGhadban). Fixes [Issue 2766](https://github.com/shakacode/react_on_rails/issues/2766).
3536

3637
### [16.5.0] - 2026-03-25
3738

@@ -61,6 +62,15 @@ Stable release — no changes from 16.5.0.rc.0.
6162
- **Fix doctor prerender check and ExecJS display for Pro/RSC apps**: `uses_prerender_in_views?` now detects Pro streaming helpers (`stream_react_component`, `cached_stream_react_component`, `rsc_payload_react_component`) that implicitly enable prerender. Server rendering engine display now correctly detects NodeRenderer configuration from the Pro initializer. [PR 2773](https://github.com/shakacode/react_on_rails/pull/2773) by [ihabadham](https://github.com/ihabadham).
6263
- **Fix doctor false positives for custom layouts**: `react_on_rails:doctor` now resolves `package.json` from `node_modules_location` config (instead of assuming repo root) and discovers webpack/rspack configs across common custom locations. Missing bundler config downgraded from error to contextual warning. [PR 2612](https://github.com/shakacode/react_on_rails/pull/2612) by [justin808](https://github.com/justin808).
6364

65+
#### Breaking Changes
66+
67+
- **[Pro]** **Minimum `async` gem version bumped to 2.29**: The streaming helper now requires `async >= 2.29` (previously `>= 2.6`) due to the migration from `Async::Variable` to `Async::Promise`. If your Gemfile pins the `async` gem below 2.29, you will need to update it before upgrading React on Rails Pro. Run `bundle update async` to pick up the new minimum.
68+
[PR 2832](https://github.com/shakacode/react_on_rails/pull/2832) by [justin808](https://github.com/justin808).
69+
70+
#### Changed
71+
72+
- **[Pro]** **Migrated from `Async::Variable` to `Async::Promise`**: The streaming helper internals now use `Async::Promise` for async v2.29+ compatibility while preserving pre-first-chunk error propagation behavior. [PR 2832](https://github.com/shakacode/react_on_rails/pull/2832) by [justin808](https://github.com/justin808). Fixes [Issue 2563](https://github.com/shakacode/react_on_rails/issues/2563).
73+
6474
### [16.4.0] - 2026-03-16
6575

6676
#### Fixed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Then use React in any Rails view:
6060
- **React Server Components**: Improved rendering flow and new `RSCRoute` component for seamless SSR
6161
- **Performance improvements**: New async loading strategies and optimized bundle generation
6262
- **Webpacker removal**: Streamlined for Shakapacker-only support (>= 6.0)
63-
- **[Pro features](https://reactonrails.com/pro)** are available for advanced use cases including [React Server Components](https://react.dev/reference/rsc/server-components), [streaming SSR](https://react.dev/reference/react-dom/server/renderToPipeableStream), and a dedicated Node renderer for 10–100x faster SSR.
63+
- **[Pro features](https://reactonrails.com/docs/pro/)** are available for advanced use cases including [React Server Components](https://react.dev/reference/rsc/server-components), [streaming SSR](https://react.dev/reference/react-dom/server/renderToPipeableStream), and a dedicated Node renderer for 10–100x faster SSR.
6464
- ShakaCode now maintains the official successor to `rails/webpacker`, [`shakapacker`](https://github.com/shakacode/shakapacker).
6565

6666
---
@@ -150,7 +150,7 @@ That's it — Pro layers on top of your existing setup. See the [Pro installatio
150150

151151
Popmenu achieved a [73% decrease in average response times and 20-25% lower Heroku costs](https://www.shakacode.com/recent-work/popmenu/) with React on Rails Pro, now serving tens of millions of SSR requests daily.
152152

153-
Ready to try Pro? Visit [pro.reactonrails.com](https://pro.reactonrails.com) or email [justin@shakacode.com](mailto:justin@shakacode.com).
153+
Ready to try Pro? Visit [React on Rails Pro docs](https://reactonrails.com/docs/pro/) or email [justin@shakacode.com](mailto:justin@shakacode.com).
154154

155155
# 📚 Quick Start
156156

@@ -253,7 +253,7 @@ ShakaCode is **[hiring passionate software engineers](https://www.shakacode.com/
253253

254254
The gem is available as open source under the terms of the [MIT License](https://github.com/shakacode/react_on_rails/tree/main/LICENSE.md).
255255

256-
Note, some features are available only with a React on Rails Pro subscription. See [React on Rails Pro](https://pro.reactonrails.com/) for more information.
256+
Note, some features are available only with a React on Rails Pro subscription. See [React on Rails Pro](https://reactonrails.com/docs/pro/) for more information.
257257

258258
# Supporters
259259

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ React on Rails is one product with two tiers: open source for Rails + React inte
3838
## Pro features
3939

4040
- [React Server Components](./pro/react-server-components/tutorial.md) - RSC with Rails
41+
- [Add RSC to Existing Pro App](./pro/react-server-components/upgrading-existing-pro-app.md) - Standalone RSC upgrade for Pro users
4142
- [Streaming SSR](./oss/building-features/streaming-server-rendering.md) - Progressive server rendering
4243
- [Node Renderer](./oss/building-features/node-renderer/basics.md) - Dedicated Node.js rendering server
4344
- [Upgrading to Pro](./pro/upgrading-to-pro.md) - Switch from OSS to Pro in three steps

docs/oss/api-reference/generator-details.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ rails generate react_on_rails:install --pro
209209

210210
**Prerequisites:**
211211

212-
- Add `gem 'react_on_rails_pro', '>= 16.3.0'` to your Gemfile and run `bundle install`
212+
- Add `gem 'react_on_rails_pro', '16.4.0'` (or later — pin to the exact version you want) to your Gemfile and run `bundle install`
213213
- Contact [justin@shakacode.com](mailto:justin@shakacode.com) for a license
214214

215215
**What gets created:**
@@ -246,7 +246,7 @@ For existing apps, use the standalone Pro generator to avoid re-processing base
246246
rails generate react_on_rails:pro
247247
```
248248

249-
See the [React on Rails Pro overview](../../pro/react-on-rails-pro.md) for feature details.
249+
See the [React on Rails Pro overview](../../pro/home-pro.md) for feature details.
250250

251251
### React Server Components Support
252252

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,44 @@
11
# Using ReactOnRails in JavaScript
22

3-
You can easily render React components in your JavaScript with `render` method that returns a [reference to the component](https://react.dev/reference/react-dom/render#returns) (virtual DOM element).
3+
You can easily render React components in your JavaScript with the `render` method. Under React 18+, it returns a React root. Under React 16/17, legacy return values vary by render or hydrate path, such as a component instance, an element, or `void`.
44

55
```js
66
/**
77
* ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app');
88
*
9-
* Does this:
9+
* Under React 16/17, this is equivalent to:
1010
* ReactDOM.render(React.createElement(HelloWorldApp, {name: "Stranger"}),
1111
* document.getElementById('app'))
1212
*
13+
* Under React 18+, it uses:
14+
* const root = ReactDOMClient.createRoot(document.getElementById('app'));
15+
* root.render(React.createElement(HelloWorldApp, {name: "Stranger"}));
16+
* return root;
17+
*
1318
* @param name Name of your registered component
1419
* @param props Props to pass to your component
1520
* @param domNodeId
1621
* @param hydrate [optional] Pass truthy to update server rendered html. Default is falsy
17-
* @returns {virtualDomElement} Reference to your component's backing instance
22+
* @returns {Root|Component|Element|void} React root in React 18+, or legacy return values in
23+
* React 16/17 depending on the render or hydrate path
1824
*/
1925
ReactOnRails.render(componentName, props, domNodeId);
2026
```
2127

2228
## Why do we need this?
2329

24-
Imagine that we have some event with jQuery, it allows us to set component state manually.
30+
Imagine that some external JavaScript decides when a component should mount with the current value.
2531

2632
```html
2733
<input id="input" type="range" min="0" max="100" />
2834
<div id="root"></div>
2935

3036
<script>
31-
var input = $('#input');
32-
var component = ReactOnRails.render('componentName', { value: input.val() }, 'root');
33-
34-
input.on('change', function (e) {
35-
component.setState({ value: input.val() });
36-
});
37+
const input = document.getElementById('input');
38+
ReactOnRails.render('componentName', { value: input.value }, 'root');
3739
</script>
3840
```
41+
42+
For subsequent updates on the same DOM node, let the mounted React component manage its own
43+
state or props flow. The public `ReactOnRails.render` API does not deduplicate repeated calls,
44+
so calling it on `#root` will invoke React unless you unmount or replace that node first.

docs/oss/api-reference/redux-store-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you are only rendering one React component on a page, as is typical to do a "
1515
Consider using the `redux_store` helper for the two following use cases:
1616

1717
1. You want to have multiple React components accessing the same store at once.
18-
2. You want to place the props to hydrate the client side stores at the very end of your HTML, probably server rendered, so that the browser can render all earlier HTML first. This is particularly useful if your props will be large. However, you're probably better off using [React on Rails Pro](https://github.com/shakacode/react_on_rails/wiki) if you're at all concerned about performance.
18+
2. You want to place the props to hydrate the client side stores at the very end of your HTML, probably server rendered, so that the browser can render all earlier HTML first. This is particularly useful if your props will be large. However, you're probably better off using [React on Rails Pro](https://reactonrails.com/docs/pro/) if you're at all concerned about performance.
1919

2020
## Multiple React Components on a Page with One Store
2121

docs/oss/api-reference/ruby-api-pro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Ruby API (Pro)
22

3-
> **Pro Feature** — Available with [React on Rails Pro](https://pro.reactonrails.com).
4-
> Free or very low cost for startups and small companies. [Get a license →](https://pro.reactonrails.com)
3+
> **Pro Feature** — Available with [React on Rails Pro](https://reactonrails.com/docs/pro/).
4+
> Free or very low cost for startups and small companies. [Get a license →](https://pro.reactonrails.com/)
55
66
## View Helpers
77

docs/oss/api-reference/view-helpers-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ This is a helper method that takes any JavaScript expression and returns the out
130130

131131
## Pro-Only View Helpers
132132

133-
The following view helpers are available exclusively with [React on Rails Pro](https://pro.reactonrails.com). These require a valid React on Rails Pro license and will not be available if the Pro gem is not installed or properly licensed.
133+
The following view helpers are available exclusively with [React on Rails Pro](https://reactonrails.com/docs/pro/). These require a valid React on Rails Pro license and will not be available if the Pro gem is not installed or properly licensed.
134134

135135
### cached_react_component and cached_react_component_hash
136136

docs/oss/building-features/bundle-caching.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Bundle Caching
22

3-
> **Pro Feature** — Available with [React on Rails Pro](https://pro.reactonrails.com).
4-
> Free or very low cost for startups and small companies. [Get a license →](https://pro.reactonrails.com)
3+
> **Pro Feature** — Available with [React on Rails Pro](https://reactonrails.com/docs/pro/).
4+
> Free or very low cost for startups and small companies. [Get a license →](https://pro.reactonrails.com/)
55
66
Bundle caching avoids redundant webpack builds by caching bundles based on a digest of source files.
77

0 commit comments

Comments
 (0)