Skip to content

[Flight] Use Web Streams APIs for 3rd-party component in Flight fixture #33481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2025

Conversation

unstubbable
Copy link
Collaborator

@unstubbable unstubbable commented Jun 7, 2025

Stacked on #33480.

Now that the Node bundles for Webpack also expose the Web Streams APIs, we can can use those in the Flight fixture for caching the 3rd-party component, without needing to convert the streams back and forth.

This new approach of how we're exposing those APIs also allows us to mix and match them with the Node Streams APIs (e.g. in the outer rendering in fixtures/flight/server/region.js). This was not possible with the previous approach of using separate bundles, because React only allows a single RSC renderer to be active at a time.

@unstubbable unstubbable changed the title Flight fixture web streams [Flight] Use Web Streams APIs for 3rd-party component in Flight fixture Jun 7, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jun 7, 2025
@unstubbable unstubbable force-pushed the flight-fixture-web-streams branch from dbd6628 to 7401385 Compare June 7, 2025 19:29
@react-sizebot
Copy link

react-sizebot commented Jun 7, 2025

Comparing: e4b88ae...b0e511c

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.07 kB 530.07 kB = 93.57 kB 93.57 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 651.16 kB 651.16 kB = 114.69 kB 114.69 kB
facebook-www/ReactDOM-prod.classic.js = 676.11 kB 676.11 kB = 118.97 kB 118.97 kB
facebook-www/ReactDOM-prod.modern.js = 666.39 kB 666.39 kB = 117.36 kB 117.36 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against b0e511c

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone might think this is recommended. 😬

But we should have coverage even if it's not.

Now that the Node bundles for Webpack also expose the Web Streams APIs,
we can can use those in the Flight fixture for caching the 3rd-party
component, without needing to convert the streams back and forth.

This new approach of how we're exposing those APIs also allows us to mix
and match them with the Node Streams APIs (e.g. in the outer rendering
in `fixtures/flight/server/region.js`). This was not possibly with the
previous approach of using separate bundles, because React only allows a
single RSC renderer to be active at a time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants