Skip to content

Commit 3173ace

Browse files
Move immediate_hydration config from core to Pro initializers
Moved immediate_hydration configuration from ReactOnRails initializers to ReactOnRailsPro initializers in dummy apps, reflecting the migration of this Pro feature from the core gem to the Pro gem. Changes: - Removed config.immediate_hydration from spec/dummy core initializer - Added config.immediate_hydration = true to Pro initializers in: - react_on_rails_pro/spec/dummy - react_on_rails_pro/spec/execjs-compatible-dummy Note: Explicitly set to true to match Pro gem's default and demonstrate the Pro feature is enabled in Pro dummy apps.
1 parent e403bc3 commit 3173ace

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

react_on_rails_pro/spec/dummy/config/initializers/react_on_rails_pro.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
# include any files used to generate the JSON props.
4040
config.dependency_globs = [File.join(Rails.root, "app", "views", "**", "*.jbuilder")]
4141

42+
# Enable immediate hydration (Pro default is true, explicitly set for clarity)
43+
config.immediate_hydration = true
44+
4245
# When using the Node Renderer, you may require some extra assets in addition to the bundle.
4346
# The assets_to_copy option allows the Node Renderer to have assets copied at the end of
4447
# the assets:precompile task or directly by the

react_on_rails_pro/spec/execjs-compatible-dummy/config/initializers/react_on_rails_pro.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@
2727
# You can run rake react_on_rails_pro:process_v8_logs to process these files and generate a profile.v8log.json file
2828
# which can be analyzed using tools like Speed Scope (https://www.speedscope.app) or Chrome Developer Tools
2929
config.profile_server_rendering_js_code = true
30+
31+
# Enable immediate hydration (Pro default is true, explicitly set for clarity)
32+
config.immediate_hydration = true
3033
end

spec/dummy/config/initializers/react_on_rails.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,5 @@ def self.adjust_props_for_client_side_hydration(component_name, props)
4141
config.rendering_props_extension = RenderingPropsExtension
4242
config.components_subdirectory = "startup"
4343
config.auto_load_bundle = true
44-
config.immediate_hydration = false
4544
config.generated_component_packs_loading_strategy = :defer
4645
end

0 commit comments

Comments
 (0)