Skip to content

Commit 41f7c3c

Browse files
Add force_load option to redux_store method at ReactOnRails::Controller
1 parent 353f725 commit 41f7c3c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/react_on_rails/controller.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ module Controller
1212
#
1313
# Be sure to include view helper `redux_store_hydration_data` at the end of your layout or view
1414
# or else there will be no client side hydration of your stores.
15-
def redux_store(store_name, props: {})
15+
def redux_store(store_name, props: {}, force_load: nil)
16+
force_load = ReactOnRails.configuration.force_load if force_load.nil?
1617
redux_store_data = { store_name: store_name,
17-
props: props }
18+
props: props,
19+
force_load: force_load }
1820
@registered_stores_defer_render ||= []
1921
@registered_stores_defer_render << redux_store_data
2022
end

0 commit comments

Comments
 (0)