dillon1000/react
Commit
Browse files [Flight] Split Streaming from Relay Implemenation (#18260)
* Add ReactFlightServerConfig intermediate This just forwards to the stream version of Flight which is itself forked between Node and W3C streams. The dom-relay goes directly to the Relay config though which allows it to avoid the stream part of Flight. * Separate streaming protocol into the Stream config * Split streaming parts into the ReactFlightServerConfigStream This decouples it so that the Relay implementation doesn't have to encode the JSON to strings. Instead it can be fed the values as JSON objects and do its own encoding. * Split FlightClient into a basic part and a stream part Same split as the server. * Expose lower level async hooks to Relay This requires an external helper file that we'll wire up internally.
Changed paths26 files
First-parent comparisonpackages/react-client/flight.js ModifiedM packages/react-client/src/ReactFlightClient.js ModifiedM packages/react-client/src/ReactFlightClientHostConfigBrowser.js ModifiedA packages/react-client/src/ReactFlightClientStream.js AddedM packages/react-flight-dom-relay/src/ReactFlightDOMRelayClient.js ModifiedM packages/react-flight-dom-relay/src/ReactFlightDOMRelayClientHostConfig.js ModifiedM packages/react-flight-dom-relay/src/ReactFlightDOMRelayServer.js ModifiedM packages/react-flight-dom-relay/src/ReactFlightDOMRelayServerHostConfig.js ModifiedA packages/react-flight-dom-relay/src/__mocks__/ReactFlightDOMRelayServerIntegration.js AddedM packages/react-flight-dom-relay/src/__tests__/ReactFlightDOMRelay-test.internal.js ModifiedM packages/react-flight-dom-webpack/src/ReactFlightDOMClient.js ModifiedM packages/react-noop-renderer/src/ReactNoopFlightClient.js ModifiedM packages/react-server/src/ReactFlightServer.js ModifiedA packages/react-server/src/ReactFlightServerConfig.js AddedA packages/react-server/src/ReactFlightServerConfigStream.js AddedA packages/react-server/src/forks/ReactFlightServerConfig.custom.js AddedA packages/react-server/src/forks/ReactFlightServerConfig.dom-browser.js AddedA packages/react-server/src/forks/ReactFlightServerConfig.dom-relay.js AddedA packages/react-server/src/forks/ReactFlightServerConfig.dom.js AddedM packages/react-server/src/forks/ReactServerStreamConfig.dom-relay.js ModifiedM scripts/flow/config/flowconfig ModifiedM scripts/flow/createFlowConfigs.js ModifiedA scripts/flow/react-relay-hooks.js AddedM scripts/jest/setupHostConfigs.js ModifiedM scripts/rollup/bundles.js ModifiedM scripts/rollup/forks.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…