You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're currently upgrading from React 18 -> 19 and we're noticing what appears to be a slight change in the how renderToPipeableStream works. Specifically around the </body></html> being sent down as a separate chunk once all suspended content has been rendered.
Mostly curious if this an expected change? I went through the changelog but couldn't find anything that pointed to this.
Context
During server render, we discover "dynamic content" (image preload URLs, lazy load scripts, etc) and inject them into the response stream using a technique very similar to this. To ensure we don't start injecting too early, we will wait until the initial shell has been streamed down before we start injecting the dynamic content into the stream.
We noticed after upgrading to React 19, our previous assumptions were no longer valid since dynamic content was now being injected incorrectly between partial html.
Steps To Reproduce
Render a full HTML document (containing something that suspends) using renderToPipeableStream.
Ex:
Confirm that in React 18.3, </body></html> is sent as part of the initial chunk beforeThingThatSuspends renders. Confirm in React 19, its sent down as a separate chunk afterThingThatSuspends renders.
The text was updated successfully, but these errors were encountered:
React version: 19.1.0
We're currently upgrading from React 18 -> 19 and we're noticing what appears to be a slight change in the how
renderToPipeableStream
works. Specifically around the</body></html>
being sent down as a separate chunk once all suspended content has been rendered.Mostly curious if this an expected change? I went through the changelog but couldn't find anything that pointed to this.
Context
During server render, we discover "dynamic content" (image preload URLs, lazy load scripts, etc) and inject them into the response stream using a technique very similar to this. To ensure we don't start injecting too early, we will wait until the initial shell has been streamed down before we start injecting the dynamic content into the stream.
We noticed after upgrading to React 19, our previous assumptions were no longer valid since dynamic content was now being injected incorrectly between partial html.
Steps To Reproduce
renderToPipeableStream
.Ex:
</body></html>
is sent as part of the initial chunk beforeThingThatSuspends
renders. Confirm in React 19, its sent down as a separate chunk afterThingThatSuspends
renders.The text was updated successfully, but these errors were encountered: