mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
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> |
||
|---|---|---|
| .. | ||
| npm | ||
| src | ||
| flight.js | ||
| package.json | ||
| README.md | ||
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.