Skip to content

Commit 3489d5f

Browse files
authored
Merge branch 'master' into update-generator-for-v15
2 parents d753ced + f7d5355 commit 3489d5f

File tree

19 files changed

+544
-224
lines changed

19 files changed

+544
-224
lines changed

CHANGELOG.md

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,31 @@ After a release, please make sure to run `bundle exec rake update_changelog`. Th
2323

2424
Changes since the last non-beta release.
2525

26+
### [16.0.0] - 2025-09-16
27+
28+
See [Release Notes](docs/release-notes/16.0.0.md) for full details.
29+
30+
#### Enhanced
31+
32+
- Improved error messages in install generator with clearer troubleshooting steps
33+
- Enhanced package manager detection with multi-strategy validation
34+
- Ensured that the RSC payload is injected after the component's HTML markup to improve the performance of the RSC payload injection. [PR 1738](https://github.com/shakacode/react_on_rails/pull/1738) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
35+
- Improved RSC rendering flow by eliminating double rendering of server components and reducing the number of HTTP requests.
36+
- Updated communication protocol between Node Renderer and Rails to version 2.0.0 which supports the ability to upload multiple bundles at once.
37+
- Added `RSCRoute` component to enable seamless server-side rendering of React Server Components. This component automatically handles RSC payload injection and hydration, allowing server components to be rendered directly within client components while maintaining optimal performance. [PR 1696](https://github.com/shakacode/react_on_rails/pull/1696) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
38+
- The global context is now accessed using `globalThis`. [PR 1727](https://github.com/shakacode/react_on_rails/pull/1727) by [alexeyr-ci2](https://github.com/alexeyr-ci2).
39+
- Generated client packs now import from `react-on-rails/client` instead of `react-on-rails`. [PR 1706](https://github.com/shakacode/react_on_rails/pull/1706) by [alexeyr-ci](https://github.com/alexeyr-ci).
40+
- The "optimization opportunity" message when importing the server-side `react-on-rails` instead of `react-on-rails/client` in browsers is now a warning for two reasons:
41+
- Make it more prominent
42+
- Include a stack trace when clicked
43+
44+
#### Added
45+
46+
- Configuration option `generated_component_packs_loading_strategy` to control how generated component packs are loaded. It supports `sync`, `async`, and `defer` strategies. [PR 1712](https://github.com/shakacode/react_on_rails/pull/1712) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
47+
- Support for returning React component from async render-function. [PR 1720](https://github.com/shakacode/react_on_rails/pull/1720) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
48+
- React Server Components Support (Pro Feature) [PR 1644](https://github.com/shakacode/react_on_rails/pull/1644) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
49+
- Improved component and store hydration performance [PR 1656](https://github.com/shakacode/react_on_rails/pull/1656) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
50+
2651
#### Removed (Breaking Changes)
2752

2853
- **Webpacker support completely removed**. Shakapacker 8.2+ is now required.
@@ -44,18 +69,6 @@ Changes since the last non-beta release.
4469
- Generator uses `Thor::Error` exceptions instead of `exit(1)` for better error handling
4570
- Migration: Ensure you have a JavaScript package manager installed before running the generator
4671

47-
#### Enhanced
48-
49-
- Simplified CI matrix configuration with clear dependency level naming (`minimum`/`latest` instead of `oldest`/`newest`)
50-
- Improved error messages in install generator with clearer troubleshooting steps
51-
- Enhanced package manager detection with multi-strategy validation
52-
53-
### [15.0.0] - 2025-08-28
54-
55-
See [Release Notes](docs/release-notes/15.0.0.md) for full details.
56-
57-
### Removed (Breaking Changes)
58-
5972
- Deprecated `defer_generated_component_packs` configuration option. You should use `generated_component_packs_loading_strategy` instead.
6073
- Migration:
6174
- `defer_generated_component_packs: true``generated_component_packs_loading_strategy: :defer`
@@ -67,35 +80,25 @@ See [Release Notes](docs/release-notes/15.0.0.md) for full details.
6780
- For TypeScript errors, upgrade to TypeScript 5.8+ and set `module` to `nodenext`.
6881
- `ReactOnRails.reactOnRailsPageLoaded` is now an async function. Migration:
6982
- Add `await` when calling this function: `await ReactOnRails.reactOnRailsPageLoaded()`.
70-
- `force_load` configuration now defaults to `true`. Migration:
71-
- Set `force_load: false` in your config if you want the previous behavior.
72-
73-
For detailed migration instructions, see the [15.0.0 Release Notes](docs/release-notes/15.0.0.md).
83+
- **RENAMED**: `force_load` configuration renamed to `immediate_hydration` for better API clarity.
84+
- `immediate_hydration` now defaults to `false` and requires React on Rails Pro license.
85+
- Migration:
86+
- `config.force_load = true``config.immediate_hydration = true`
87+
- `react_component(force_load: true)``react_component(immediate_hydration: true)`
88+
- `redux_store(force_load: true)``redux_store(immediate_hydration: true)`
89+
For detailed migration instructions, see the [16.0.0 Release Notes](docs/release-notes/16.0.0.md).
7490

7591
#### Fixed
7692

7793
- Enable support for ReactRefreshWebpackPlugin v0.6.0 by adding conditional logic regarding configuration. [PR 1748](https://github.com/shakacode/react_on_rails/pull/1748) by [judahmeek](https://github.com/judahmeek).
7894
- Replace RenderOptions.renderRequestId and use local trackers instead. This change should only be relevant to ReactOnRails Pro users. [PR 1745](https://github.com/shakacode/react_on_rails/pull/1745) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
7995
- Fixed invalid warnings about non-exact versions when using a pre-release version of React on Rails, as well as missing warnings when using different pre-release versions of the gem and the Node package. [PR 1742](https://github.com/shakacode/react_on_rails/pull/1742) by [alexeyr-ci2](https://github.com/alexeyr-ci2).
8096

81-
#### Improved
82-
83-
- Ensured that the RSC payload is injected after the component's HTML markup to improve the performance of the RSC payload injection. [PR 1738](https://github.com/shakacode/react_on_rails/pull/1738) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
84-
- Improved RSC rendering flow by eliminating double rendering of server components and reducing the number of HTTP requests.
85-
- Updated communication protocol between Node Renderer and Rails to version 2.0.0 which supports the ability to upload multiple bundles at once.
86-
- Added `RSCRoute` component to enable seamless server-side rendering of React Server Components. This component automatically handles RSC payload injection and hydration, allowing server components to be rendered directly within client components while maintaining optimal performance. [PR 1696](https://github.com/shakacode/react_on_rails/pull/1696) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
87-
- The global context is now accessed using `globalThis`. [PR 1727](https://github.com/shakacode/react_on_rails/pull/1727) by [alexeyr-ci2](https://github.com/alexeyr-ci2).
88-
- Generated client packs now import from `react-on-rails/client` instead of `react-on-rails`. [PR 1706](https://github.com/shakacode/react_on_rails/pull/1706) by [alexeyr-ci](https://github.com/alexeyr-ci).
89-
- The "optimization opportunity" message when importing the server-side `react-on-rails` instead of `react-on-rails/client` in browsers is now a warning for two reasons:
90-
- Make it more prominent
91-
- Include a stack trace when clicked
97+
### [15.0.0] - 2025-08-28 - RETRACTED
9298

93-
#### Added
99+
**⚠️ This version has been retracted due to API design issues. Please upgrade directly to v16.0.0.**
94100

95-
- Configuration option `generated_component_packs_loading_strategy` to control how generated component packs are loaded. It supports `sync`, `async`, and `defer` strategies. [PR 1712](https://github.com/shakacode/react_on_rails/pull/1712) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
96-
- Support for returning React component from async render-function. [PR 1720](https://github.com/shakacode/react_on_rails/pull/1720) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
97-
- React Server Components Support (Pro Feature) [PR 1644](https://github.com/shakacode/react_on_rails/pull/1644) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
98-
- Improved component and store hydration performance [PR 1656](https://github.com/shakacode/react_on_rails/pull/1656) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
101+
The `force_load` feature was incorrectly available without a Pro license and has been renamed to `immediate_hydration` for better clarity. All features from v15 are available in v16 with the corrected API.
99102

100103
### [14.2.0] - 2025-03-03
101104

@@ -1593,8 +1596,8 @@ such as:
15931596

15941597
- Fix several generator-related issues.
15951598

1596-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/15.0.0...master
1597-
[15.0.0]: https://github.com/shakacode/react_on_rails/compare/14.2.0...15.0.0
1599+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/16.0.0...master
1600+
[16.0.0]: https://github.com/shakacode/react_on_rails/compare/14.2.0...16.0.0
15981601
[14.2.0]: https://github.com/shakacode/react_on_rails/compare/14.1.1...14.2.0
15991602
[14.1.1]: https://github.com/shakacode/react_on_rails/compare/14.1.0...14.1.1
16001603
[14.1.0]: https://github.com/shakacode/react_on_rails/compare/14.0.5...14.1.0

CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1515
- All linters: `rake lint` (runs ESLint and RuboCop)
1616
- ESLint only: `yarn run lint` or `rake lint:eslint`
1717
- RuboCop only: `rake lint:rubocop`
18+
- **Code Formatting**:
19+
- Format code with Prettier: `yarn start format`
20+
- Check formatting without fixing: `yarn start format.listDifferent`
1821
- **Build**: `yarn run build` (compiles TypeScript to JavaScript in node_package/lib)
1922
- **Type checking**: `yarn run type-check`
2023

CONTRIBUTING.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,42 @@ cd react_on_rails/
180180
yarn run check
181181
```
182182

183+
## Development Commands
184+
185+
### Code Formatting
186+
187+
To format JavaScript/TypeScript files with Prettier:
188+
189+
```sh
190+
yarn start format
191+
```
192+
193+
To check formatting without fixing:
194+
195+
```sh
196+
yarn start format.listDifferent
197+
```
198+
199+
### Linting
200+
201+
Run all linters (ESLint and RuboCop):
202+
203+
```sh
204+
rake lint
205+
```
206+
207+
Run only RuboCop:
208+
209+
```sh
210+
rake lint:rubocop
211+
```
212+
213+
Run only ESLint:
214+
215+
```sh
216+
yarn run lint
217+
```
218+
183219
### Starting the Dummy App
184220

185221
To run the dummy app, it's **CRITICAL** to not just run `rails s`. You have to run `foreman start` with one of the Procfiles. If you don't do this, then `webpack` will not generate a new bundle, and you will be seriously confused when you change JavaScript and the app does not change. If you change the Webpack configs, then you need to restart Foreman. If you change the JS code for react-on-rails, you need to run `yarn run build` in the project root.

docs/guides/configuration.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,14 @@ ReactOnRails.configure do |config|
223223
# DEPRECATED: Use `generated_component_packs_loading_strategy` instead.
224224
# Migration: `defer_generated_component_packs: true` → `generated_component_packs_loading_strategy: :defer`
225225
# Migration: `defer_generated_component_packs: false` → `generated_component_packs_loading_strategy: :sync`
226-
# See [15.0.0 Release Notes](docs/release-notes/15.0.0.md) for more details.
226+
# See [16.0.0 Release Notes](docs/release-notes/16.0.0.md) for more details.
227227
# config.defer_generated_component_packs = false
228228

229-
# Default is true
230-
# When true, components hydrate immediately as soon as their server-rendered HTML reaches the client,
231-
# without waiting for the full page load. This improves time-to-interactive performance.
232-
config.force_load = true
229+
# Default is false
230+
# React on Rails Pro (licensed) feature: When true, components hydrate immediately as soon as
231+
# their server-rendered HTML reaches the client, without waiting for the full page load.
232+
# This improves time-to-interactive performance.
233+
config.immediate_hydration = false
233234

234235
################################################################################
235236
# I18N OPTIONS

docs/guides/streaming-server-rendering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ React on Rails Pro supports streaming server rendering using React 18's latest A
66

77
- React on Rails Pro subscription
88
- React 19
9-
- React on Rails v15.0.0-alpha.0 or higher
9+
- React on Rails v16.0.0 or higher
1010
- React on Rails Pro v4.0.0.rc.5 or higher
1111

1212
## Benefits of Streaming Server Rendering

docs/rails/turbolinks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ document.addEventListener('turbolinks:load', function () {
103103
React on Rails 15 fixes both issues, so if you still have the listener it can be removed (and should be as `reactOnRailsPageLoaded()` is now async).
104104

105105
> [!WARNING]
106-
> Do not use `force_load: false` with Turbolinks if you have async scripts.
106+
> Do not use `immediate_hydration: false` (React on Rails Pro licensed feature) with Turbolinks if you have async scripts.
107107
108108
## Troubleshooting
109109

0 commit comments

Comments
 (0)