Skip to content

Commit 1b0830d

Browse files
committed
Improve docs
1 parent df4b37e commit 1b0830d

File tree

2 files changed

+112
-96
lines changed

2 files changed

+112
-96
lines changed

CHANGELOG.md

Lines changed: 72 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -23,86 +23,80 @@ 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-01-XX
27-
28-
#### Removed (Breaking Changes)
29-
30-
- **Webpacker support completely removed**. Shakapacker >= 6.0 is now required.
31-
- Migration:
32-
- Remove any `webpacker` gem references from your Gemfile
33-
- Ensure `shakapacker` gem version 6.0 or higher is installed (8.0+ recommended)
34-
- Replace any `bin/webpacker` commands with `bin/shakapacker`
35-
- Update any webpacker configuration files to shakapacker equivalents
36-
- Removed files: `rakelib/webpacker_examples.rake`, `lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb`
37-
- All webpacker compatibility code and tests have been removed
38-
- **CI/Development runtime requirements updated**:
39-
- _Note, this is just what CI tests_. You can use older versions of Ruby and Node.js, but you may run into issues.\*
40-
- Minimum Ruby version: 3.2 (was 3.0)
41-
- Maximum Ruby version: 3.4 (was 3.3)
42-
- Minimum Node.js version: 20 (was 16)
43-
- Maximum Node.js version: 22 (was 20)
44-
- Migration: Upgrade your Ruby and Node.js versions to supported ranges
45-
- **Install generator now validates prerequisites**:
46-
- Generator now requires at least one JavaScript package manager (npm, pnpm, yarn, or bun)
47-
- Generator uses `Thor::Error` exceptions instead of `exit(1)` for better error handling
48-
- Migration: Ensure you have a JavaScript package manager installed before running the generator
49-
50-
#### Enhanced
51-
52-
- Simplified CI matrix configuration with clear dependency level naming (`minimum`/`latest` instead of `oldest`/`newest`)
53-
- Improved error messages in install generator with clearer troubleshooting steps
54-
- Enhanced package manager detection with multi-strategy validation
55-
56-
### [15.0.0] - 2025-08-28
57-
58-
See [Release Notes](docs/release-notes/16.0.0.md) for full details.
59-
60-
### Removed (Breaking Changes)
61-
62-
- Deprecated `defer_generated_component_packs` configuration option. You should use `generated_component_packs_loading_strategy` instead.
63-
- Migration:
64-
- `defer_generated_component_packs: true``generated_component_packs_loading_strategy: :defer`
65-
- `defer_generated_component_packs: false``generated_component_packs_loading_strategy: :sync`
66-
- For best performance, use `generated_component_packs_loading_strategy: :async`
67-
- [PR 1712](https://github.com/shakacode/react_on_rails/pull/1712) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
68-
- The package is ESM-only now. Migration:
69-
- If using `require('react-on-rails')`, upgrade to Node v20.19.0+ or change to `import`.
70-
- For TypeScript errors, upgrade to TypeScript 5.8+ and set `module` to `nodenext`.
71-
- `ReactOnRails.reactOnRailsPageLoaded` is now an async function. Migration:
72-
- Add `await` when calling this function: `await ReactOnRails.reactOnRailsPageLoaded()`.
73-
- **RENAMED**: `force_load` configuration renamed to `immediate_hydration` for better API clarity.
74-
- `immediate_hydration` now defaults to `false` and requires React on Rails Pro license.
75-
- Migration:
76-
- `config.force_load = true``config.immediate_hydration = true`
77-
- `react_component(force_load: true)``react_component(immediate_hydration: true)`
78-
- `redux_store(force_load: true)``redux_store(immediate_hydration: true)`
79-
80-
For detailed migration instructions, see the [16.0.0 Release Notes](docs/release-notes/16.0.0.md).
81-
82-
#### Fixed
83-
84-
- 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).
85-
- 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).
86-
- 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).
26+
### [16.0.0] - 2025-09-16
8727

88-
#### Improved
28+
**React on Rails v16 is a major release that modernizes the library with ESM support, removes legacy Webpacker compatibility, and introduces significant performance improvements. This release builds on the foundation of v14 with enhanced RSC (React Server Components) support and streamlined configuration.**
8929

90-
- 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).
91-
- Improved RSC rendering flow by eliminating double rendering of server components and reducing the number of HTTP requests.
92-
- Updated communication protocol between Node Renderer and Rails to version 2.0.0 which supports the ability to upload multiple bundles at once.
93-
- 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).
94-
- 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).
95-
- 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).
96-
- 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:
97-
- Make it more prominent
98-
- Include a stack trace when clicked
30+
See [Release Notes](docs/release-notes/16.0.0.md) for complete migration guide.
9931

100-
#### Added
32+
#### Major Enhancements
33+
34+
**🚀 React Server Components (RSC) -- Requires React on Rails Pro**
35+
- **Enhanced RSC rendering flow**: Eliminated double rendering and reduced HTTP requests
36+
- **`RSCRoute` component**: Seamless server-side rendering with automatic payload injection and hydration [PR 1696](https://github.com/shakacode/react_on_rails/pull/1696) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
37+
- **Optimized RSC payload injection**: Now injected after component HTML markup for better performance [PR 1738](https://github.com/shakacode/react_on_rails/pull/1738) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
38+
- **Communication protocol v2.0.0**: Supports uploading multiple bundles at once for improved efficiency
39+
40+
**⚡ Performance & Loading Strategy**
41+
- **New `generated_component_packs_loading_strategy`**: Choose from `sync`, `async`, or `defer` strategies [PR 1712](https://github.com/shakacode/react_on_rails/pull/1712) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
42+
- **Async render function support**: Components can now return from async render functions [PR 1720](https://github.com/shakacode/react_on_rails/pull/1720) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
43+
- **Optimized client imports**: Generated packs now import from `react-on-rails/client` for better tree-shaking [PR 1706](https://github.com/shakacode/react_on_rails/pull/1706) by [alexeyr-ci](https://github.com/alexeyr-ci)
44+
45+
#### Developer Experience
46+
47+
- **Enhanced error messaging**: Clearer troubleshooting steps and prominent optimization warnings
48+
- **Modern global access**: Using `globalThis` instead of window/global detection [PR 1727](https://github.com/shakacode/react_on_rails/pull/1727) by [alexeyr-ci2](https://github.com/alexeyr-ci2)
49+
- **Simplified CI configuration**: Clear `minimum`/`latest` dependency naming instead of `oldest`/`newest`
50+
- **ReactRefreshWebpackPlugin v0.6.0 support**: Added conditional logic for proper configuration [PR 1748](https://github.com/shakacode/react_on_rails/pull/1748) by [judahmeek](https://github.com/judahmeek)
51+
- **Version validation improvements**: Fixed invalid warnings with pre-release versions [PR 1742](https://github.com/shakacode/react_on_rails/pull/1742) by [alexeyr-ci2](https://github.com/alexeyr-ci2)
52+
53+
54+
#### Breaking Changes
55+
56+
**🔧 Webpacker Support Removed**
57+
- **Complete removal of Webpacker support**. Shakapacker >= 6.0 is now required.
58+
- Migration:
59+
- Remove `webpacker` gem from your Gemfile
60+
- Install `shakapacker` gem version 6.0+ (8.0+ recommended)
61+
- Replace `bin/webpacker` commands with `bin/shakapacker`
62+
- Update webpacker configuration files to shakapacker equivalents
63+
- Removed files: `rakelib/webpacker_examples.rake`, `lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb`
64+
65+
**📦 Package System Modernization**
66+
- **ESM-only package**: CommonJS `require()` no longer supported
67+
- Migration:
68+
- Replace `require('react-on-rails')` with `import ReactOnRails from 'react-on-rails'`
69+
- For Node.js < 20.19.0, upgrade or use dynamic imports
70+
- For TypeScript errors, upgrade to TypeScript 5.8+ and set `module: "nodenext"`
71+
72+
**⚡ Configuration API Changes**
73+
- **`defer_generated_component_packs` deprecated** → use `generated_component_packs_loading_strategy`
74+
- Migration:
75+
- `defer_generated_component_packs: true``generated_component_packs_loading_strategy: :defer`
76+
- `defer_generated_component_packs: false``generated_component_packs_loading_strategy: :sync`
77+
- Recommended: `generated_component_packs_loading_strategy: :async` for best performance
78+
79+
- **`force_load` renamed to `immediate_hydration`** for API clarity
80+
- Migration:
81+
- `config.force_load = true``config.immediate_hydration = true`
82+
- `react_component(force_load: true)``react_component(immediate_hydration: true)`
83+
- `redux_store(force_load: true)``redux_store(immediate_hydration: true)`
84+
- Note: `immediate_hydration` requires React on Rails Pro license
85+
86+
**🔄 Async API Changes**
87+
- **`ReactOnRails.reactOnRailsPageLoaded()` is now async**
88+
- Migration: Add `await` when calling: `await ReactOnRails.reactOnRailsPageLoaded()`
89+
90+
**🏗️ Runtime Suggested Versions**
91+
- Ruby: 3.2 - 3.4 (was 3.0 - 3.3)
92+
- Node.js: 20 - 22 (was 16 - 20)
93+
- Note: These are CI-tested versions; older versions may work but aren't guaranteed
94+
95+
**🎯 Generator Improvements**
96+
- Install generator now validates JavaScript package manager presence
97+
- Improved error handling with `Thor::Error` instead of `exit(1)`
98+
- Enhanced error messages with clearer troubleshooting steps
10199

102-
- 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).
103-
- 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).
104-
- React Server Components Support (Pro Feature) [PR 1644](https://github.com/shakacode/react_on_rails/pull/1644) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
105-
- Improved component and store hydration performance [PR 1656](https://github.com/shakacode/react_on_rails/pull/1656) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
106100

107101
### [15.0.0] - 2025-08-28 - RETRACTED
108102

@@ -1606,8 +1600,8 @@ such as:
16061600

16071601
- Fix several generator-related issues.
16081602

1609-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/15.0.0...master
1610-
[15.0.0]: https://github.com/shakacode/react_on_rails/compare/14.2.0...15.0.0
1603+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/16.0.0...master
1604+
[16.0.0]: https://github.com/shakacode/react_on_rails/compare/14.2.0...16.0.0
16111605
[14.2.0]: https://github.com/shakacode/react_on_rails/compare/14.1.1...14.2.0
16121606
[14.1.1]: https://github.com/shakacode/react_on_rails/compare/14.1.0...14.1.1
16131607
[14.1.0]: https://github.com/shakacode/react_on_rails/compare/14.0.5...14.1.0

0 commit comments

Comments
 (0)