Skip to content

Commit 9c8ec8a

Browse files
justin808claude
andcommitted
Update defer comment to clarify backward-compatibility only
Per reviewer guidance, updated comment in spec/dummy layout to explicitly state that defer: true is retained solely for backward-compatibility and testing purposes, not recommended for production. The comment now references docs/building-features/streaming-server-rendering.md and recommends using async: true with immediate_hydration or generated_component_packs_loading_strategy: :async for production apps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cf6dba5 commit 9c8ec8a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

spec/dummy/app/views/layouts/application.html.erb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99

1010
<%= yield :head %>
1111

12-
<%# defer: true is safe here because this app does NOT use streaming server rendering.
13-
defer also ensures scripts load in the correct order when using auto-generated component packs.
14-
For apps with streaming components, use defer: false or async: true to enable
15-
React 18's Selective Hydration. See docs/building-features/streaming-server-rendering.md %>
12+
<%# defer: true is used here solely for backward-compatibility and testing purposes.
13+
Per reviewer guidance and docs/building-features/streaming-server-rendering.md,
14+
defer: true is NOT recommended for production in any scenario (streaming or non-streaming).
15+
Instead, use async: true with immediate_hydration or set
16+
generated_component_packs_loading_strategy: :async for production apps. %>
1617
<%= javascript_pack_tag('client-bundle', 'data-turbo-track': 'reload', defer: true) %>
1718

1819
<%= csrf_meta_tags %>

0 commit comments

Comments
 (0)