react_on_rails 16.0.1.rc.4 → 16.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1866bb608bf6b62df70e1ebb9e708596b59f620d08311ea8116e534bdb1180be
4
- data.tar.gz: bc7ad5c8cca569395d3da1db1e3ee3d9a0f3a986ac8777eadae28b06d8514e6a
3
+ metadata.gz: 2c21887212877416942c74ec9e7fd5e99fd7f99369ca0de9245a5efbb6d02c76
4
+ data.tar.gz: 5fbeddccacde6852d5ec1fcfbcc941846056df77899d95b93c6f4b88c6dd168e
5
5
  SHA512:
6
- metadata.gz: 5d5651560869dc69bb9a7ce4f1d5666b7cc10c3fa84827087aa9c1c2c7afb20100eee674ca2b906ca3fec49ca4558af111c38558104976ad49290e07a0751b9a
7
- data.tar.gz: 1cabd8aea0ef8545861f325494c6c051550a463ec73d9e206dfb8548060db0c8fe78bde5359e1ce921d787c9d99ad3961858e9a5ab81d7ae9e490b150ed32cd2
6
+ metadata.gz: 426a51bc79efc791faf2758931acec0b028f39292ea165dd28e539065f32f54b199f98e33fe49c8265e6bc90f8833810695c8e369d4d4c682bb27cd694c27f0d
7
+ data.tar.gz: 4004d4636034bb7c91a1b1412b6d9a26d80a70249bd0f6a239ccd9130f790ad3bcbc08a393ef30dd40d2279f82d2097b12b8d4246b9b71234ba2ebd8a1f386dc
@@ -0,0 +1,63 @@
1
+ # 🤖 AI Agent Instructions: React on Rails Setup
2
+
3
+ _Super concise, copy-paste instructions for AI agents to set up React on Rails in common scenarios._
4
+
5
+ ## 🔍 **Before Starting: Check Current Versions**
6
+
7
+ ```bash
8
+ # Get latest available versions (recommended approach)
9
+ gem search react_on_rails --remote
10
+ ```
11
+
12
+ Install and update gem and npm package using strict option.
13
+
14
+ ---
15
+
16
+ ## 🆕 Scenario 1: New Rails App with React on Rails
17
+
18
+ ```bash
19
+ # Create new Rails app
20
+ rails new myapp --skip-javascript --database=postgresql
21
+ cd myapp
22
+
23
+ # Use latest version
24
+ bundle add react_on_rails --strict
25
+
26
+ bin/rails generate react_on_rails:install
27
+
28
+ # Accept change to bin/dev
29
+
30
+ # Start development servers
31
+ bin/dev
32
+ ```
33
+
34
+ **✅ Success Check:** Visit `http://localhost:3000/hello_world` → Should see "Hello World" from React
35
+
36
+ ---
37
+
38
+ ## 🔄 Scenario 2: Add React on Rails to Existing Rails App
39
+
40
+ ```bash
41
+ cd /path/to/existing/app
42
+ # Use latest version
43
+ bundle add react_on_rails --strict
44
+
45
+ bin/rails generate react_on_rails:install
46
+
47
+ # Accept change to bin/dev
48
+
49
+ # Start development servers
50
+ bin/dev
51
+ # Navigate to existing Rails app root
52
+
53
+ # Start development
54
+ bin/dev
55
+ ```
56
+
57
+ ---
58
+
59
+ ## 🛠️ Common Troubleshooting Commands
60
+
61
+ - Always run `bin/dev` to test setup, and check browser console for any JavaScript errors
62
+ - `bin/dev kill` stops other conflicting processes
63
+ - `bin/rake react_on_rails:doctor` for helpful information
data/CHANGELOG.md CHANGED
@@ -23,100 +23,78 @@ After a release, please make sure to run `bundle exec rake update_changelog`. Th
23
23
 
24
24
  Changes since the last non-beta release.
25
25
 
26
- #### Breaking Changes
26
+ #### Bug Fixes
27
27
 
28
- - **Removed `generated_assets_dirs` configuration**: The legacy `config.generated_assets_dirs` option is no longer supported and will raise an error if used. Since Shakapacker is now required, asset paths are automatically determined from `shakapacker.yml` configuration. Remove any `config.generated_assets_dirs` from your `config/initializers/react_on_rails.rb` file. Use `public_output_path` in `config/shakapacker.yml` to customize asset output location instead. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798)
28
+ - **React Server Components**: Fixed bug in resolving `react-server-client-manifest.json` file path. The manifest file path is now correctly resolved using `bundle_js_file_path` for improved configuration flexibility and consistency in bundle management. [PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
29
+
30
+ ### [16.1.0] - 2025-09-23
29
31
 
30
32
  #### New Features
31
33
 
32
34
  - **Server Bundle Security**: Added new configuration options for enhanced server bundle security and organization:
33
35
 
34
- - `server_bundle_output_path`: Configurable directory (relative to the Rails root) for server bundle output (default: "ssr-generated"). If set to `nil`, the server bundle will be loaded from the same public directory as client bundles.
35
- - `enforce_private_server_bundles`: When enabled, ensures server bundles are only loaded from private directories outside the public folder (default: false for backward compatibility)
36
+ - `server_bundle_output_path`: Configurable directory (relative to the Rails root) for server bundle output (default: "ssr-generated"). If set to `nil`, the server bundle will be loaded from the same public directory as client bundles. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
37
+ - `enforce_private_server_bundles`: When enabled, ensures server bundles are only loaded from private directories outside the public folder (default: false for backward compatibility) [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
36
38
 
37
39
  - **Improved Bundle Path Resolution**: Bundle path resolution for server bundles now works as follows:
40
+
38
41
  - If `server_bundle_output_path` is set, the server bundle is loaded from that directory.
39
42
  - If `server_bundle_output_path` is not set, the server bundle falls back to the client bundle directory (typically the public output path).
40
43
  - If `enforce_private_server_bundles` is enabled:
41
44
  - The server bundle will only be loaded from the private directory specified by `server_bundle_output_path`.
42
45
  - If the bundle is not found there, it will _not_ fall back to the public directory.
43
46
  - If `enforce_private_server_bundles` is not enabled and the bundle is not found in the private directory, it will fall back to the public directory.
44
- - This logic ensures that, when strict enforcement is enabled, server bundles are never loaded from public directories, improving security and clarity of bundle resolution.
47
+ - This logic ensures that, when strict enforcement is enabled, server bundles are never loaded from public directories, improving security and clarity of bundle resolution. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
48
+
49
+ - **`react_on_rails:doctor` rake task**: New diagnostic command to validate React on Rails setup and identify configuration issues. Provides comprehensive checks for environment prerequisites, dependencies, Rails integration, and Webpack configuration. Use `rake react_on_rails:doctor` to diagnose your setup, with optional `VERBOSE=true` for detailed output. [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
50
+
51
+ #### Deprecations
52
+
53
+ - **Deprecated `generated_assets_dirs` configuration**: The legacy `config.generated_assets_dirs` option is now deprecated and will show a deprecation warning if used. Since Shakapacker is now required, asset paths are automatically determined from `shakapacker.yml` configuration. Remove any `config.generated_assets_dirs` from your `config/initializers/react_on_rails.rb` file. Use `public_output_path` in `config/shakapacker.yml` to customize asset output location instead. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
45
54
 
46
55
  #### API Improvements
47
56
 
48
57
  - **Method Naming Clarification**: Added `public_bundles_full_path` method to clarify bundle path handling:
49
58
  - `public_bundles_full_path`: New method specifically for webpack bundles in public directories
50
59
  - `generated_assets_full_path`: Now deprecated (backwards-compatible alias)
51
- - This eliminates confusion between webpack bundles and general Rails public assets
60
+ - This eliminates confusion between webpack bundles and general Rails public assets [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
52
61
 
53
62
  #### Security Enhancements
54
63
 
55
- - **Private Server Bundle Enforcement**: When `enforce_private_server_bundles` is enabled, server bundles bypass public directory fallbacks and are only loaded from designated private locations
56
- - **Path Validation**: Added validation to ensure `server_bundle_output_path` points to private directories when enforcement is enabled
64
+ - **Private Server Bundle Enforcement**: When `enforce_private_server_bundles` is enabled, server bundles bypass public directory fallbacks and are only loaded from designated private locations [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
65
+ - **Path Validation**: Added validation to ensure `server_bundle_output_path` points to private directories when enforcement is enabled [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
66
+ - **Fixed command injection vulnerabilities**: Replaced unsafe string interpolation in generator package installation commands with secure array-based system calls [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
67
+ - **Improved input validation**: Enhanced package manager validation and argument sanitization across all generators [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
68
+ - **Hardened DOM selectors**: Using `CSS.escape()` and proper JavaScript escaping for XSS protection [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
57
69
 
58
- #### Bug Fixes
70
+ #### Pro License Features
59
71
 
60
- - **Non-Packer Environment Compatibility**: Fixed potential NoMethodError when using bundle path resolution in environments without Shakapacker
61
- - **Shakapacker version requirements**: Fixed inconsistent version requirements between basic pack generation (6.5.1+) and advanced auto-bundling features (7.0.0+). Added backward compatibility for users on Shakapacker 6.5.1-6.9.x while providing clear upgrade guidance for advanced features. Added new constants `MINIMUM_SHAKAPACKER_VERSION_FOR_AUTO_BUNDLING` and improved version checking performance with caching. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798)
72
+ - **Core/Pro separation**: Moved Pro features into dedicated `lib/react_on_rails/pro/` and `node_package/src/pro/` directories with clear licensing boundaries [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
73
+ - **Runtime license validation**: Implemented Pro license gating with graceful fallback to core functionality when Pro license unavailable [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
74
+ - **Enhanced immediate hydration**: Improved immediate hydration functionality with Pro license validation and warning badges [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
75
+ - **License documentation**: Added NOTICE files in Pro directories referencing canonical `REACT-ON-RAILS-PRO-LICENSE.md` [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
62
76
 
63
- ### [16.0.1-rc.2] - 2025-09-20
77
+ #### Generator Improvements
64
78
 
65
- #### Bug Fixes
66
-
67
- - **Packs generator**: Fixed error when `server_bundle_js_file` configuration is empty (default). Added safety check to prevent attempting operations on invalid file paths when server-side rendering is not configured. [PR 1802](https://github.com/shakacode/react_on_rails/pull/1802)
68
-
69
- ### [16.0.1-rc.2] - 2025-09-20
79
+ - **Modern TypeScript patterns**: Generators now produce more idiomatic TypeScript code with improved type inference instead of explicit type annotations [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
80
+ - **Optimized tsconfig.json**: Updated compiler options to use `"moduleResolution": "bundler"` for better bundler compatibility [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
81
+ - **Enhanced Redux TypeScript integration**: Improved type safety and modern React patterns (useMemo, type-only imports) [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
82
+ - **Smart bin/dev defaults**: Generated `bin/dev` script now automatically navigates to `/hello_world` route for immediate component visibility [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
83
+ - **Better component templates**: Removed unnecessary type annotations while maintaining type safety through TypeScript's inference [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
84
+ - **Cleaner generated code**: Streamlined templates following modern React and TypeScript best practices [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
85
+ - **Improved helper methods**: Added reusable `component_extension` helper for consistent file extension handling [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
70
86
 
71
87
  #### Bug Fixes
72
88
 
73
- - **Doctor rake task**: Fixed LoadError in `rake react_on_rails:doctor` when using packaged gem. The task was trying to require excluded `rakelib/task_helpers` file. [PR 1795](https://github.com/shakacode/react_on_rails/pull/1795)
74
- - **Shakapacker version requirements**: Fixed inconsistent version requirements between basic pack generation (6.5.1+) and advanced auto-registration features (7.0.0+). Added backward compatibility for users on Shakapacker 6.5.1-6.9.x while providing clear upgrade guidance for advanced features. Added new constants `MINIMUM_SHAKAPACKER_VERSION_FOR_AUTO_REGISTRATION` and improved version checking performance with caching. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798)
89
+ - **Doctor rake task**: Fixed LoadError in `rake react_on_rails:doctor` when using packaged gem. The task was trying to require excluded `rakelib/task_helpers` file. [PR 1795](https://github.com/shakacode/react_on_rails/pull/1795) by [justin808](https://github.com/justin808)
90
+ - **Packs generator**: Fixed error when `server_bundle_js_file` configuration is empty (default). Added safety check to prevent attempting operations on invalid file paths when server-side rendering is not configured. [PR 1802](https://github.com/shakacode/react_on_rails/pull/1802) by [justin808](https://github.com/justin808)
91
+ - **Non-Packer Environment Compatibility**: Fixed potential NoMethodError when using bundle path resolution in environments without Shakapacker [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
92
+ - **Shakapacker version requirements**: Fixed inconsistent version requirements between basic pack generation (6.5.1+) and advanced auto-bundling features (7.0.0+). Added backward compatibility for users on Shakapacker 6.5.1-6.9.x while providing clear upgrade guidance for advanced features. Added new constants `MINIMUM_SHAKAPACKER_VERSION_FOR_AUTO_BUNDLING` and improved version checking performance with caching. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [justin808](https://github.com/justin808)
75
93
 
76
- #### Code Cleanup
94
+ #### Code Improvements
77
95
 
78
96
  - **PackerUtils abstraction removal**: Removed unnecessary `PackerUtils.packer` abstraction method and replaced all calls with direct `::Shakapacker` usage. This simplifies the codebase by eliminating an abstraction layer that was originally created to support multiple webpack tools but is no longer needed since we only support Shakapacker. All tests updated accordingly. [PR 1798](https://github.com/shakacode/react_on_rails/pull/1798) by [claude-code](https://claude.ai/code)
79
-
80
- ### [16.0.1-rc.0] - 2025-09-19
81
-
82
- #### Pro License Structure Implementation
83
-
84
- **🔐 License Architecture**
85
-
86
- - **Core/Pro separation**: Moved Pro features into dedicated `lib/react_on_rails/pro/` and `node_package/src/pro/` directories with clear licensing boundaries [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [abanoubghadban](https://github.com/AbanoubGhadban)
87
- - **Runtime license validation**: Implemented Pro license gating with graceful fallback to core functionality when Pro license unavailable
88
- - **License documentation**: Added NOTICE files in Pro directories referencing canonical `REACT-ON-RAILS-PRO-LICENSE.md`
89
- - **Updated LICENSE.md**: Clearly distinguishes core MIT license from Pro-licensed directories
90
-
91
- **⚡ Pro Feature Enhancements**
92
-
93
- - **Immediate hydration**: Enhanced immediate hydration functionality with Pro license validation and warning badges
94
- - **Security improvements**: Hardened DOM selectors using `CSS.escape()` and proper JavaScript escaping for XSS protection
95
- - **Architecture refactoring**: Centralized Pro utilities and clean separation between core and Pro helper functionality
96
-
97
- #### Enhanced TypeScript Generator Support
98
-
99
- **🔧 Generator Improvements**
100
-
101
- - **Modern TypeScript patterns**: Generators now produce more idiomatic TypeScript code with improved type inference instead of explicit type annotations [PR 1786](https://github.com/shakacode/react_on_rails/pull/1786) by [justin808](https://github.com/justin808)
102
- - **Optimized tsconfig.json**: Updated compiler options to use `"moduleResolution": "bundler"` for better bundler compatibility
103
- - **Enhanced Redux TypeScript integration**: Improved type safety and modern React patterns (useMemo, type-only imports)
104
- - **Smart bin/dev defaults**: Generated `bin/dev` script now automatically navigates to `/hello_world` route for immediate component visibility
105
-
106
- **🔐 Security Enhancements**
107
-
108
- - **Fixed command injection vulnerabilities**: Replaced unsafe string interpolation in generator package installation commands with secure array-based system calls
109
- - **Improved input validation**: Enhanced package manager validation and argument sanitization across all generators
110
-
111
- **🎯 Developer Experience**
112
-
113
- - **Better component templates**: Removed unnecessary type annotations while maintaining type safety through TypeScript's inference
114
- - **Cleaner generated code**: Streamlined templates following modern React and TypeScript best practices
115
- - **Improved helper methods**: Added reusable `component_extension` helper for consistent file extension handling
116
-
117
- #### Added
118
-
119
- - **`react_on_rails:doctor` rake task**: New diagnostic command to validate React on Rails setup and identify configuration issues. Provides comprehensive checks for environment prerequisites, dependencies, Rails integration, and Webpack configuration. Use `rake react_on_rails:doctor` to diagnose your setup, with optional `VERBOSE=true` for detailed output.
97
+ - **Architecture refactoring**: Centralized Pro utilities and clean separation between core and Pro helper functionality [PR 1791](https://github.com/shakacode/react_on_rails/pull/1791) by [AbanoubGhadban](https://github.com/AbanoubGhadban)
120
98
 
121
99
  ### [16.0.0] - 2025-09-16
122
100
 
@@ -1702,9 +1680,8 @@ such as:
1702
1680
 
1703
1681
  - Fix several generator-related issues.
1704
1682
 
1705
- [Unreleased]: https://github.com/shakacode/react_on_rails/compare/16.0.1-rc.2...master
1706
- [16.0.1-rc.2]: https://github.com/shakacode/react_on_rails/compare/16.0.1-rc.0...16.0.1-rc.2
1707
- [16.0.1-rc.0]: https://github.com/shakacode/react_on_rails/compare/16.0.0...16.0.1-rc.0
1683
+ [Unreleased]: https://github.com/shakacode/react_on_rails/compare/16.1.0...master
1684
+ [16.1.0]: https://github.com/shakacode/react_on_rails/compare/16.0.0...16.1.0
1708
1685
  [16.0.0]: https://github.com/shakacode/react_on_rails/compare/14.2.0...16.0.0
1709
1686
  [14.2.0]: https://github.com/shakacode/react_on_rails/compare/14.1.1...14.2.0
1710
1687
  [14.1.1]: https://github.com/shakacode/react_on_rails/compare/14.1.0...14.1.1
data/CONTRIBUTING.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Tips for Contributors
2
2
 
3
+ **🏗️ Important: Monorepo Merger in Progress**
4
+
5
+ We are currently working on merging the `react_on_rails` and `react_on_rails_pro` repositories into a unified monorepo. This will provide better development experience while maintaining separate package identities and licensing. See [docs/MONOREPO_MERGER_PLAN_REF.md](./docs/MONOREPO_MERGER_PLAN_REF.md) for details.
6
+
7
+ During this transition:
8
+
9
+ - Continue contributing to the current structure
10
+ - License compliance remains critical - ensure no Pro code enters MIT-licensed areas
11
+ - Major structural changes may be coordinated with the merger plan
12
+
13
+ ---
14
+
3
15
  - [docs/contributor-info/Releasing](./docs/contributor-info/releasing.md) for instructions on releasing.
4
16
  - [docs/contributor-info/pull-requests](./docs/contributor-info/pull-requests.md)
5
17
  - See other docs in [docs/contributor-info](./docs/contributor-info)
@@ -39,6 +39,10 @@ group :development, :test do
39
39
  gem "scss_lint", require: false
40
40
  gem "spring", "~> 4.0"
41
41
  gem "lefthook", require: false
42
+ # Added for Ruby 3.5+ compatibility to silence warnings
43
+ gem "benchmark", require: false
44
+ gem "logger", require: false
45
+ gem "ostruct", require: false
42
46
  end
43
47
 
44
48
  group :test do
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- react_on_rails (16.0.1.rc.4)
4
+ react_on_rails (16.1.0)
5
5
  addressable
6
6
  connection_pool
7
7
  execjs (~> 2.5)
@@ -91,6 +91,7 @@ GEM
91
91
  amazing_print (1.6.0)
92
92
  ast (2.4.2)
93
93
  base64 (0.2.0)
94
+ benchmark (0.4.1)
94
95
  bigdecimal (3.1.8)
95
96
  bootsnap (1.18.3)
96
97
  msgpack (~> 1.2)
@@ -160,6 +161,7 @@ GEM
160
161
  listen (3.9.0)
161
162
  rb-fsevent (~> 0.10, >= 0.10.3)
162
163
  rb-inotify (~> 0.9, >= 0.9.10)
164
+ logger (1.7.0)
163
165
  loofah (2.22.0)
164
166
  crass (~> 1.0.2)
165
167
  nokogiri (>= 1.12.0)
@@ -189,6 +191,7 @@ GEM
189
191
  nokogiri (1.16.6)
190
192
  mini_portile2 (~> 2.8.2)
191
193
  racc (~> 1.4)
194
+ ostruct (0.6.1)
192
195
  package_json (0.1.0)
193
196
  parallel (1.24.0)
194
197
  parser (3.3.1.0)
@@ -402,6 +405,7 @@ PLATFORMS
402
405
 
403
406
  DEPENDENCIES
404
407
  amazing_print
408
+ benchmark
405
409
  bootsnap
406
410
  capybara
407
411
  capybara-screenshot
@@ -415,6 +419,8 @@ DEPENDENCIES
415
419
  launchy
416
420
  lefthook
417
421
  listen
422
+ logger
423
+ ostruct
418
424
  package_json
419
425
  pry
420
426
  pry-byebug
data/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
  [![Build Rspec Tests](https://github.com/shakacode/react_on_rails/actions/workflows/rspec-package-specs.yml/badge.svg)](https://github.com/shakacode/react_on_rails/actions/workflows/rspec-package-specs.yml)
17
17
  [![Linting](https://github.com/shakacode/react_on_rails/actions/workflows/lint-js-and-ruby.yml/badge.svg)](https://github.com/shakacode/react_on_rails/actions/workflows/lint-js-and-ruby.yml)
18
18
 
19
- # News
19
+ # ⚡ What's New
20
20
 
21
21
  **🚀 React on Rails v16.0 Released!** Major modernization with ESM support, enhanced React Server Components, and streamlined configuration.
22
22
 
@@ -31,11 +31,13 @@
31
31
 
32
32
  _These are the docs for React on Rails 16. To see the older docs and code: [v14](https://github.com/shakacode/react_on_rails/tree/14.0.0), [v13](https://github.com/shakacode/react_on_rails/tree/13.4.0), [v12](https://github.com/shakacode/react_on_rails/tree/12.6.0), and [v11](https://github.com/shakacode/react_on_rails/tree/11.3.0)._
33
33
 
34
- # About
34
+ # 🎯 About React on Rails
35
35
 
36
- React on Rails integrates Rails with (server rendering of) [React](https://github.com/facebook/react).
36
+ **Seamlessly integrate React components into your Rails application** with server-side rendering, hot reloading, and automatic bundle optimization.
37
37
 
38
- This project is maintained by [ShakaCode](https://www.shakacode.com).
38
+ > **"The easiest way to add React to Rails"** - Thousands of developers rely on React on Rails for production applications.
39
+
40
+ This project is maintained by [ShakaCode](https://www.shakacode.com) with ❤️ from the Rails and React communities.
39
41
 
40
42
  ## ShakaCode Upgrade Support
41
43
 
@@ -93,30 +95,34 @@ We did this for Popmenu, [lowering Heroku costs 20-25% while getting a 73% decre
93
95
 
94
96
  If you're interested, read more about [React on Rails Pro](https://www.shakacode.com/react-on-rails-pro/) and [book a call](https://meetings.hubspot.com/justingordon/30-minute-consultation).
95
97
 
96
- # Documentation
98
+ # 📚 Quick Start
99
+
100
+ **New to React on Rails?** Get up and running in minutes:
97
101
 
98
- See the documentation at **[shakacode.com/react-on-rails/docs](https://www.shakacode.com/react-on-rails/docs/)** and [React on Rails Pro](https://www.shakacode.com/react-on-rails-pro/).
102
+ 🚀 **[15-Minute Quick Start](https://www.shakacode.com/react-on-rails/docs/quick-start/)** - Your first React component
103
+ 📖 **[Complete Documentation](https://www.shakacode.com/react-on-rails/docs/)** - Comprehensive guides and API reference
104
+ 🎮 **[Live Demo](https://reactrails.com)** - See it in action with [source code](https://github.com/shakacode/react-webpack-rails-tutorial)
99
105
 
100
106
  ## Project Objective
101
107
 
102
108
  To provide a high-performance framework for integrating Ruby on Rails with React, especially regarding React Server-Side Rendering for better SEO and improved performance.
103
109
 
104
- ## Features and Why React on Rails?
105
-
106
- Given that `shakacode/shakapacker` gem already provides basic React integration, why would you use "React on Rails"?
107
-
108
- 1. **Modern ESM-only package** with optimized tree-shaking for smaller bundle sizes and better performance.
109
- 1. **Advanced loading strategies** with `sync`, `async`, and `defer` options for optimal performance based on your needs.
110
- 1. **Automatic configuration** of what bundles are added to the page based on what React components are on the page. This results in faster browser loading time via smaller bundle sizes.
111
- 1. **Keep up with the latest changes** in different versions of React. React 18+ is fully supported with enhanced React Server Components.
112
- 1. **Easy prop passing** directly from your Rails view to your React components rather than having your Rails view load and then make a separate request to your API.
113
- Tight integration with [shakapacker](https://github.com/shakacode/shakapacker).
114
- 1. **Server-Side Rendering (SSR)** with enhanced React Server Components support, often used for SEO crawler indexing and UX performance.
115
- 1. **[Automated optimized entry-point creation and bundle inclusion](https://www.shakacode.com/react-on-rails/docs/guides/file-system-based-automated-bundle-generation/)** when placing a component on a page. With this feature, you no longer need to configure `javascript_pack_tags` and `stylesheet_pack_tags` on your layouts based on what's shown. "It just works!"
116
- 1. **[Redux](https://redux.js.org/) and [React Router](https://reactrouter.com/) integration** with server-side-rendering.
117
- 1. **[Internationalization (I18n) and (localization)](https://www.shakacode.com/react-on-rails/docs/guides/i18n)** support.
118
- 1. **Supportive community**. This [web search shows how live public sites are using React on Rails](https://publicwww.com/websites/%22react-on-rails%22++-undeveloped.com+depth%3Aall/).
119
- 1. **[ReScript Support](https://github.com/shakacode/rescript-react-on-rails-example)**.
110
+ ## Why React on Rails?
111
+
112
+ | Feature | Benefit |
113
+ | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
114
+ | 🎯 **Smart Bundle Loading** | [Automated bundle optimization](./docs/guides/auto-bundling-file-system-based-automated-bundle-generation.md) based on components used - no more manual `javascript_pack_tags` configuration |
115
+ | **Server-Side Rendering** | Enhanced React Server Components support for better SEO and UX performance |
116
+ | 🚀 **Advanced Loading** | `sync`, `async`, and `defer` options for optimal performance based on your needs |
117
+ | 🔥 **Hot Module Replacement** | Instant feedback during development with tight [Shakapacker](https://github.com/shakacode/shakapacker) integration |
118
+ | 📦 **Easy Props Passing** | Direct Rails React data flow without separate API calls |
119
+ | 🗺️ **Router Integration** | [React Router](https://reactrouter.com/) with SSR support |
120
+ | 🏪 **State Management** | [Redux](https://redux.js.org/) integration with server-side rendering |
121
+ | 🌍 **Internationalization** | [I18n and localization support](https://www.shakacode.com/react-on-rails/docs/guides/i18n) for global apps |
122
+ | 🎨 **Modern React** | React 18+ with enhanced React Server Components and latest patterns |
123
+ | 🦄 **ReScript Support** | [ReScript integration](https://github.com/shakacode/rescript-react-on-rails-example) for type-safe development |
124
+
125
+ > **Trusted by thousands** - See [real production sites](https://publicwww.com/websites/%22react-on-rails%22++-undeveloped.com+depth%3Aall/) using React on Rails
120
126
 
121
127
  See [Rails/Shakapacker React Integration Options](https://www.shakacode.com/react-on-rails/docs/guides/rails-webpacker-react-integration-options) for comparisons to other gems.
122
128
 
@@ -95,7 +95,7 @@ module ReactOnRails
95
95
  run "bundle"
96
96
  end
97
97
 
98
- def update_gitignore_for_auto_registration
98
+ def update_gitignore_for_generated_bundles
99
99
  gitignore_path = File.join(destination_root, ".gitignore")
100
100
  return unless File.exist?(gitignore_path)
101
101
 
@@ -37,7 +37,7 @@ module ReactOnRails
37
37
  component_name: "HelloWorld"
38
38
  }
39
39
 
40
- # Only create the view template - no manual bundle needed for auto registration
40
+ # Only create the view template - no manual bundle needed for auto-bundling
41
41
  template("#{base_path}/app/views/hello_world/index.html.erb.tt",
42
42
  "app/views/hello_world/index.html.erb", config)
43
43
  end
@@ -68,7 +68,7 @@ module ReactOnRails
68
68
  component_name: "HelloWorldApp"
69
69
  }
70
70
 
71
- # Only create the view template - no manual bundle needed for auto registration
71
+ # Only create the view template - no manual bundle needed for auto-bundling
72
72
  template("#{base_path}/app/views/hello_world/index.html.erb.tt",
73
73
  "app/views/hello_world/index.html.erb", config)
74
74
  end
@@ -112,7 +112,8 @@ module ReactOnRails
112
112
  private_class_method def self.server_bundle?(bundle_name)
113
113
  config = ReactOnRails.configuration
114
114
  bundle_name == config.server_bundle_js_file ||
115
- bundle_name == config.rsc_bundle_js_file
115
+ bundle_name == config.rsc_bundle_js_file ||
116
+ bundle_name == config.react_server_client_manifest_file
116
117
  end
117
118
 
118
119
  private_class_method def self.handle_missing_manifest_entry(bundle_name, is_server_bundle)
@@ -170,7 +171,7 @@ module ReactOnRails
170
171
  "react_server_client_manifest_file is nil, ensure it is set in your configuration"
171
172
  end
172
173
 
173
- @react_server_manifest_path = File.join(public_bundles_full_path, asset_name)
174
+ @react_server_manifest_path = bundle_js_file_path(asset_name)
174
175
  end
175
176
 
176
177
  def self.running_on_windows?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReactOnRails
4
- VERSION = "16.0.1.rc.4"
4
+ VERSION = "16.1.1"
5
5
  end
@@ -83,7 +83,7 @@ namespace :react_on_rails do
83
83
  puts Rainbow(" • Keep only the client/server specific files " \
84
84
  "(Component.client.jsx, Component.server.jsx)").white
85
85
  puts Rainbow(" • See: https://www.shakacode.com/react-on-rails/docs/guides/" \
86
- "file-system-based-automated-bundle-generation.md").cyan
86
+ "auto-bundling-file-system-based-automated-bundle-generation.md").cyan
87
87
 
88
88
  when /Cannot find component/
89
89
  puts Rainbow(" • Check that your component file exists in the expected location").white
@@ -118,7 +118,7 @@ namespace :react_on_rails do
118
118
  puts ""
119
119
  puts Rainbow("📚 DOCUMENTATION:").magenta.bold
120
120
  puts Rainbow(" • File-system based components: https://www.shakacode.com/react-on-rails/docs/" \
121
- "guides/file-system-based-automated-bundle-generation.md").cyan
121
+ "guides/auto-bundling-file-system-based-automated-bundle-generation.md").cyan
122
122
  puts Rainbow(" • Component registration: https://www.shakacode.com/react-on-rails/docs/").cyan
123
123
  puts Rainbow("=" * 80).red
124
124
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.0.1.rc.4
4
+ version: 16.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
@@ -114,6 +114,7 @@ executables: []
114
114
  extensions: []
115
115
  extra_rdoc_files: []
116
116
  files:
117
+ - AI_AGENT_INSTRUCTIONS.md
117
118
  - CHANGELOG.md
118
119
  - CLAUDE.md
119
120
  - CODING_AGENTS.md