dillon1000/react
Commit
Browse files [Flight] Allow aborting encodeReply (#31106)
Allow aborting encoding arguments to a Server Action if a Promise doesn't resolve. That way at least part of the arguments can be used on the receiving side. This leaves it unresolved in the stream rather than encoding an error. This should error on the receiving side when the stream closes but it doesn't right now in the Edge/Browser versions because closing happens immediately before we've had a chance to call `.then()` so the Chunks are still in pending state. This is an existing bug also in FlightClient.
Changed paths7 files
First-parent comparisonpackages/react-client/src/ReactFlightReplyClient.js ModifiedM packages/react-server-dom-esm/src/client/ReactFlightDOMClientBrowser.js ModifiedM packages/react-server-dom-turbopack/src/client/ReactFlightDOMClientBrowser.js ModifiedM packages/react-server-dom-turbopack/src/client/ReactFlightDOMClientEdge.js ModifiedM packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMReply-test.js ModifiedM packages/react-server-dom-webpack/src/client/ReactFlightDOMClientBrowser.js ModifiedM packages/react-server-dom-webpack/src/client/ReactFlightDOMClientEdge.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…