File tree Expand file tree Collapse file tree 2 files changed +1
-29
lines changed Expand file tree Collapse file tree 2 files changed +1
-29
lines changed Original file line number Diff line number Diff line change @@ -19,23 +19,4 @@ class ApplicationController < ActionController::Base
1919 redirect_to server_side_log_throw_raise_invoker_path ,
2020 flash : { error : msg }
2121 end
22-
23- helper_method :uses_redux_shared_store?
24-
25- # Returns true if the current page uses Redux shared stores with inline registration
26- # These pages require defer: true instead of async: true for proper script execution order
27- def uses_redux_shared_store?
28- # Pages that use redux_store helper with inline component registration
29- action_name . in? ( %w[
30- index
31- server_side_redux_app
32- server_side_redux_app_cached
33- server_side_hello_world_shared_store
34- server_side_hello_world_shared_store_defer
35- server_side_hello_world_shared_store_controller
36- client_side_hello_world_shared_store
37- client_side_hello_world_shared_store_defer
38- client_side_hello_world_shared_store_controller
39- ] )
40- end
4122end
Original file line number Diff line number Diff line change 99
1010 <%= yield :head %>
1111
12- <%# Conditionally use defer: true for pages with Redux shared stores (inline registration).
13- Modern apps should use async: true for optimal performance. See docs for details:
14- docs/building-features/streaming-server-rendering.md %>
15- <% if uses_redux_shared_store? %>
16- <%# defer: true required for Redux shared stores with inline component registration %>
17- <%= javascript_pack_tag ( 'client-bundle' , 'data-turbo-track' : 'reload' , defer : true ) %>
18- <% else %>
19- <%# async: true is the recommended approach for modern apps (Shakapacker >= 8.2.0) %>
20- <%= javascript_pack_tag ( 'client-bundle' , 'data-turbo-track' : 'reload' , async : true ) %>
21- <% end %>
12+ <%= javascript_pack_tag ( 'client-bundle' , 'data-turbo-track' : 'reload' , defer : true ) %>
2213
2314 <%= csrf_meta_tags %>
2415</ head >
You can’t perform that action at this time.
0 commit comments