Skip to content

Commit d95291b

Browse files
authored
update to use ror 15.0.0 (#554)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced a strategy-based setting for loading generated component packs with an :async option to make other components interactive sooner (replaces prior boolean flag). * **Documentation** * Updated guidance on selective hydration to reflect the new loading strategy and its interactivity impact. * **Chores** * Upgraded react_on_rails to 15.0.0 across the project and raised the minimum runtime dependency to 15.0.0. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 226018a commit d95291b

File tree

12 files changed

+25
-26
lines changed

12 files changed

+25
-26
lines changed

Gemfile.development_dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
55

66
ruby '3.3.7'
77

8-
gem "react_on_rails", "15.0.0.rc.2" # keep in sync with package.json files
8+
gem "react_on_rails", "15.0.0" # keep in sync with package.json files
99

1010
# For local development
1111
# Add the following line to the Gemfile.local file

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ PATH
1515
execjs (~> 2.9)
1616
httpx (~> 1.5)
1717
rainbow
18-
react_on_rails (>= 14.1.0)
18+
react_on_rails (>= 15.0.0)
1919

2020
GEM
2121
remote: https://rubygems.org/
@@ -288,7 +288,7 @@ GEM
288288
ffi (~> 1.0)
289289
rdoc (6.12.0)
290290
psych (>= 4.0.0)
291-
react_on_rails (15.0.0.rc.2)
291+
react_on_rails (15.0.0)
292292
addressable
293293
connection_pool
294294
execjs (~> 2.5)
@@ -468,7 +468,7 @@ DEPENDENCIES
468468
pry-theme
469469
puma (~> 6)
470470
rails (~> 7.1)
471-
react_on_rails (= 15.0.0.rc.2)
471+
react_on_rails (= 15.0.0)
472472
react_on_rails_pro!
473473
rspec-rails
474474
rspec-retry

docs/react-server-components/selective-hydration-in-streamed-components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ This happens because React on Rails by default adds the scripts that hydrate com
5555

5656
This default behavior was kept for backward compatibility, as there were previously race conditions that could occur when using `async` scripts before the page fully loaded. However, these race conditions have been fixed in the latest React on Rails release.
5757

58-
To enable true selective hydration, we need to configure React on Rails to load scripts as `async` scripts by adding `defer_generated_component_packs: false` to the React on Rails initializer:
58+
To enable true selective hydration, we need to configure React on Rails to load scripts as `async` scripts by setting `generated_component_packs_loading_strategy: :async` in the initializer:
5959

6060
```ruby
6161
# config/initializers/react_on_rails.rb
6262
ReactOnRails.configure do |config|
63-
config.defer_generated_component_packs = false
63+
config.generated_component_packs_loading_strategy = :async
6464
end
6565
```
6666

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"nps": "^5.9.12",
8686
"pino-pretty": "^13.0.0",
8787
"prettier": "^3.2.5",
88-
"react-on-rails": "15.0.0-rc.2",
88+
"react-on-rails": "15.0.0",
8989
"redis": "^5.0.1",
9090
"release-it": "^17.6.0",
9191
"sentry-testkit": "^5.0.6",

react_on_rails_pro.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
3232
s.add_runtime_dependency "execjs", "~> 2.9"
3333
s.add_runtime_dependency "httpx", "~> 1.5"
3434
s.add_runtime_dependency "rainbow"
35-
s.add_runtime_dependency "react_on_rails", ">= 14.1.0"
35+
s.add_runtime_dependency "react_on_rails", ">= 15.0.0"
3636
s.add_development_dependency "bundler"
3737
s.add_development_dependency "commonmarker"
3838
s.add_development_dependency "gem-release"

spec/dummy/Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ PATH
1515
execjs (~> 2.9)
1616
httpx (~> 1.5)
1717
rainbow
18-
react_on_rails (>= 14.1.0)
18+
react_on_rails (>= 15.0.0)
1919

2020
GEM
2121
remote: https://rubygems.org/
@@ -315,7 +315,7 @@ GEM
315315
ffi (~> 1.0)
316316
rdoc (6.12.0)
317317
psych (>= 4.0.0)
318-
react_on_rails (15.0.0.rc.2)
318+
react_on_rails (15.0.0)
319319
addressable
320320
connection_pool
321321
execjs (~> 2.5)
@@ -516,7 +516,7 @@ DEPENDENCIES
516516
pry-theme
517517
puma (~> 6)
518518
rails (~> 7.1)
519-
react_on_rails (= 15.0.0.rc.2)
519+
react_on_rails (= 15.0.0)
520520
react_on_rails_pro!
521521
redis
522522
rspec-rails

spec/dummy/config/initializers/react_on_rails.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,4 @@ def self.adjust_props_for_client_side_hydration(_component_name, props)
3939

4040
config.auto_load_bundle = true
4141
config.components_subdirectory = "ror-auto-load-components"
42-
config.defer_generated_component_packs = false
4342
end

spec/dummy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"react-dom": "19.0.0",
5252
"react-error-boundary": "^4.1.2",
5353
"react-helmet": "^6.0.0-beta.2",
54-
"react-on-rails": "15.0.0-rc.2",
54+
"react-on-rails": "15.0.0",
5555
"react-on-rails-rsc": "^19.0.2",
5656
"react-proptypes": "^1.0.0",
5757
"react-redux": "^9.2.0",

spec/dummy/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5353,10 +5353,10 @@ react-on-rails-rsc@^19.0.2:
53535353
neo-async "^2.6.1"
53545354
webpack-sources "^3.2.0"
53555355

5356-
5357-
version "15.0.0-rc.2"
5358-
resolved "https://registry.yarnpkg.com/react-on-rails/-/react-on-rails-15.0.0-rc.2.tgz#183c61749f5ef08aa2421a8a5d498a99eb16ca1b"
5359-
integrity sha512-LEsDqLXVlgS4DDI7VBxZYnNUQZp1Apf1solN1ZW9Tgd7IfR+f3zLoBHSn2OiEtLQKliLWpBNc1NXkeFJs4QsKQ==
5356+
5357+
version "15.0.0"
5358+
resolved "https://registry.yarnpkg.com/react-on-rails/-/react-on-rails-15.0.0.tgz#8edc78670129394cd92293842ae88c62d4cb030b"
5359+
integrity sha512-Uht8HWm8ZVN8OeDz03b3YLtprzHXhFTw7hb0jl8IpOjbig91DBuurBVxr4tfuymuemGwdjhQpscho33Cnw9Atg==
53605360

53615361
react-proptypes@^1.0.0:
53625362
version "1.0.0"

spec/execjs-compatible-dummy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"prop-types": "^15.8.1",
3030
"react": "^18.3.1",
3131
"react-dom": "^18.3.1",
32-
"react-on-rails": "15.0.0-rc.2",
32+
"react-on-rails": "15.0.0",
3333
"shakapacker": "8.0.0",
3434
"style-loader": "^4.0.0",
3535
"terser-webpack-plugin": "5",

0 commit comments

Comments
 (0)