react/packages/react-client
Hendrik Liebau ac2c1a5a58
[Flight] Ensure blocked debug info is handled properly (#34524)
This PR ensures that server components are reliably included in the
DevTools component tree, even if debug info is received delayed, e.g.
when using a debug channel. The fix consists of three parts:

- We must not unset the debug chunk before all debug info entries are
resolved.
- We must ensure that the "RSC Stream" IO debug info entry is pushed
last, after all other entries were resolved.
- We need to transfer the debug info from blocked element chunks onto
the lazy node and the element.

Ideally, we wouldn't even create a lazy node for blocked elements that
are at the root of the JSON payload, because that would basically wrap a
lazy in a lazy. This optimization that ensures that everything around
the blocked element can proceed is only needed for nested elements.
However, we also need it for resolving deduped references in blocked
root elements, unless we adapt that logic, which would be a bigger lift.

When reloading the Flight fixture, the component tree is now displayed
deterministically. Previously, it would sometimes omit synchronous
server components.

<img width="306" height="565" alt="complete"
src="https://github.com/user-attachments/assets/db61aa10-1816-43e6-9903-0e585190cdf1"
/>

---------

Co-authored-by: Sebastian Markbage <sebastian@calyptus.eu>
2025-09-25 15:13:15 +02:00
..
npm Don't minify symbols in production builds (#28881) 2024-04-20 11:23:46 -04:00
src [Flight] Ensure blocked debug info is handled properly (#34524) 2025-09-25 15:13:15 +02:00
flight.js Remove Flight Relay DOM/Native (#26828) 2023-05-17 20:33:25 -04:00
package.json Remove loose-envify dep and browserify configs (#28480) 2024-03-01 20:49:51 +00:00
README.md Add Relay Flight Build (#18242) 2020-03-07 11:23:30 -08:00

react-client

This is an experimental package for consuming custom React streaming models.

Its API is not as stable as that of React, React Native, or React DOM, and does not follow the common versioning scheme.

Use it at your own risk.