Skip to content

Commit b6890aa

Browse files
Fix controller redux_store to get immediate_hydration from Pro config
Same fix as helper.rb - the controller redux_store method was also trying to get immediate_hydration from core configuration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 50a3cc3 commit b6890aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/react_on_rails/controller.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ module Controller
1515
# Be sure to include view helper `redux_store_hydration_data` at the end of your layout or view
1616
# or else there will be no client side hydration of your stores.
1717
def redux_store(store_name, props: {}, immediate_hydration: nil)
18-
immediate_hydration = ReactOnRails.configuration.immediate_hydration if immediate_hydration.nil?
18+
if immediate_hydration.nil? && ReactOnRails::Utils.react_on_rails_pro?
19+
immediate_hydration = ReactOnRailsPro.configuration.immediate_hydration
20+
end
21+
immediate_hydration = false if immediate_hydration.nil?
1922
redux_store_data = { store_name: store_name,
2023
props: props,
2124
immediate_hydration: immediate_hydration }

0 commit comments

Comments
 (0)