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
- The `defer_generated_component_packs` configuration has been deprecated. Use `generated_component_packs_loading_strategy` instead.
57
57
- The `generated_component_packs_loading_strategy` defaults to `:async` for Shakapacker ≥ 8.2.0 and `:sync` for Shakapacker < 8.2.0.
58
-
- The `force_load` configuration now defaults to `true`.
59
-
-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).
58
+
- The `immediate_hydration` configuration now defaults to `false`. **Note: `immediate_hydration` is a React on Rails Pro (licensed) feature.**
59
+
-When `generated_component_packs_loading_strategy: :async` and `immediate_hydration: true`are configured together, they optimize component hydration. Components 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).
60
60
61
61
- 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.
62
-
- 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.
63
-
-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.
64
-
- You can also keep it for individual components by passing `force_load: false` to `react_component` or `stream_react_component`.
65
-
- Redux store now supports `force_load` option, which defaults to `config.force_load` (and so to `true` if that isn't set). If `true`, the Redux store will hydrate immediately as soon as its server-side data reaches the client.
66
-
- You can override this behavior for individual Redux stores by calling the `redux_store` helper with `force_load: false`, same as `react_component`.
62
+
- The `immediate_hydration` configuration (React on Rails Pro licensed feature) makes `react-on-rails` hydrate components immediately as soon as their server-rendered HTML reaches the client, without waiting for the full page load.
63
+
-To enable optimized hydration, you can set `immediate_hydration: true`in your `config/initializers/react_on_rails.rb` file (requires React on Rails Pro license).
64
+
- You can also enable it for individual components by passing `immediate_hydration: true` to `react_component` or `stream_react_component`.
65
+
- Redux store now supports the `immediate_hydration` option (React on Rails Pro licensed feature), which defaults to `config.immediate_hydration` (and so to `false` if that isn't set). If `true`, the Redux store will hydrate immediately as soon as its server-side data reaches the client.
66
+
- You can override this behavior for individual Redux stores by calling the `redux_store` helper with `immediate_hydration: true` or `immediate_hydration: false`, same as `react_component`.
67
67
68
68
-`ReactOnRails.reactOnRailsPageLoaded()` is now an async function:
0 commit comments