Skip to content

Commit c1d10b6

Browse files
linting
1 parent b37cd97 commit c1d10b6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ After a release, please make sure to run `bundle exec rake update_changelog`. Th
2424
Changes since the last non-beta release.
2525

2626
#### Added
27+
2728
- 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).
2829

2930
### Removed (Breaking Changes)
31+
3032
- Removed `defer_generated_component_packs` configuration option. You can use `generated_component_packs_loading_strategy` instead. [PR 1712](https://github.com/shakacode/react_on_rails/pull/1712) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
3133

3234
### [15.0.0-alpha.2] - 2025-03-07

docs/release-notes/15.0.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Major improvements to component and store hydration:
2222
- No need to use `defer` anymore
2323

2424
### Enhanced Script Loading Strategies
25+
2526
- New configuration option `generated_component_packs_loading_strategy` replaces `defer_generated_component_packs`
2627
- Supports three loading strategies:
2728
- `:async` - Loads scripts asynchronously (default for Shakapacker ≥ 8.2.0)
@@ -37,6 +38,7 @@ Major improvements to component and store hydration:
3738
- The `generated_component_packs_loading_strategy` defaults to `:async` for Shakapacker ≥ 8.2.0 and `:sync` for Shakapacker < 8.2.0.
3839
- The `force_load` configuration now defaults to `true`.
3940
- The new default values of `generated_component_packs_loading_strategy: :async` and `force_load: true` work together to optimize component hydration. Components now hydrate as soon as their code and server-rendered HTML are available, without waiting for the full page to load. This parallel processing significantly improves time-to-interactive by eliminating the traditional waterfall of waiting for page load before beginning hydration (It's critical for streamed HTML).
41+
4042
- The previous need for deferring scripts to prevent race conditions has been eliminated due to improved hydration handling. Making scripts not defer is critical to execute the hydration scripts early before the page is fully loaded.
4143
- The `force_load` configuration makes `react-on-rails` hydrate components immediately as soon as their server-rendered HTML reaches the client, without waiting for the full page load.
4244
- If you want to keep the previous behavior, you can set `generated_component_packs_loading_strategy: :defer` or `force_load: false` in your `config/initializers/react_on_rails.rb` file.
@@ -61,6 +63,7 @@ Major improvements to component and store hydration:
6163
- If you call it in a `turbolinks:load` listener to work around the issue documented in [Turbolinks](https://www.shakacode.com/react-on-rails/docs/rails/turbolinks/#async-script-loading), the listener can be safely removed.
6264

6365
### Script Loading Strategy Migration
66+
6467
- If you were previously using `defer_generated_component_packs: true`, use `generated_component_packs_loading_strategy: :defer` instead
6568
- If you were previously using `defer_generated_component_packs: false`, use `generated_component_packs_loading_strategy: :sync` instead
6669
- For optimal performance with Shakapacker ≥ 8.2.0, consider using `generated_component_packs_loading_strategy: :async`

0 commit comments

Comments
 (0)