You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
87
27
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.**
89
29
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.
99
31
100
-
#### Added
32
+
#### Major Enhancements
33
+
34
+
**🚀 React Server Components (RSC) -- Requires React on Rails Pro**
-**`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
- 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
101
99
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).
0 commit comments