Skip to content

Commit 434d173

Browse files
Rename flight_payload_streaming to rsc_payload_streaming
1 parent a9967e1 commit 434d173

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/react_on_rails/helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def internal_stream_react_component(component_name, options = {})
433433
end
434434

435435
def internal_rsc_react_component(react_component_name, options = {})
436-
options = options.merge(render_mode: :flight_payload_streaming)
436+
options = options.merge(render_mode: :rsc_payload_streaming)
437437
render_options = create_render_options(react_component_name, options)
438438
json_stream = server_rendered_react_component(render_options)
439439
json_stream.transform do |chunk|

lib/react_on_rails/react_component/render_options.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,19 @@ def render_mode
115115
# Determines the React rendering strategy:
116116
# - :sync: Synchronous SSR using renderToString (blocking and rendering in one shot)
117117
# - :html_streaming: Progressive SSR using renderToPipeableStream (non-blocking and rendering incrementally)
118-
# - :flight_payload_streaming: Server Components serialized in React flight format
118+
# - :rsc_payload_streaming: Server Components serialized in React flight format
119119
# (non-blocking and rendering incrementally).
120120
options.fetch(:render_mode, :sync)
121121
end
122122

123123
def streaming?
124124
# Returns true if the component should be rendered incrementally
125-
%i[html_streaming flight_payload_streaming].include?(render_mode)
125+
%i[html_streaming rsc_payload_streaming].include?(render_mode)
126126
end
127127

128-
def flight_payload_streaming?
128+
def rsc_payload_streaming?
129129
# Returns true if the component should be rendered as a React Server Component
130-
render_mode == :flight_payload_streaming
130+
render_mode == :rsc_payload_streaming
131131
end
132132

133133
def html_streaming?

0 commit comments

Comments
 (0)