mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 00:20:04 +01:00
This adds plumbing for opening a stream from the Flight Client to the Flight Server so it can ask for more data on-demand. In this mode, the Flight Server keeps the connection open as long as the client is still alive and there's more objects to load. It retains any depth limited objects so that they can be asked for later. In this first PR it just releases the object when it's discovered on the server and doesn't actually lazy load it yet. That's coming in a follow up. This strategy is built on the model that each request has its own channel for this. Instead of some global registry. That ensures that referential identity is preserved within a Request and the Request can refer to previously written objects by reference. The fixture implements a WebSocket per request but it doesn't have to be done that way. It can be multiplexed through an existing WebSocket for example. The current protocol is just a Readable(Stream) on the server and WritableStream on the client. It could even be sent through a HTTP request body if browsers implemented full duplex (which they don't). This PR only implements the direction of messages from Client to Server. However, I also plan on adding Debug Channel in the other direction to allow debug info (optionally) be sent from Server to Client through this channel instead of through the main RSC request. So the `debugChannel` option will be able to take writable or readable or both. --------- Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de> |
||
|---|---|---|
| .. | ||
| art | ||
| attribute-behavior | ||
| concurrent/time-slicing | ||
| devtools | ||
| dom | ||
| eslint-v6 | ||
| eslint-v7 | ||
| eslint-v8 | ||
| eslint-v9 | ||
| expiration | ||
| fiber-debugger | ||
| fizz | ||
| fizz-ssr-browser | ||
| flight | ||
| flight-esm | ||
| flight-parcel | ||
| legacy-jsx-runtimes | ||
| nesting | ||
| owner-stacks | ||
| packaging | ||
| scheduler | ||
| ssr | ||
| ssr2 | ||
| stacks | ||
| view-transition | ||