dillon1000/react
Commit
Browse files [Flight] do not emit error after abort (#30683)
When synchronously aborting in a non-async Function Component if you throw after aborting the task would error rather than abort because React never observed the AbortSignal. Using a sigil to throw after aborting during render isn't effective b/c the user code itself could throw so insteead we just read the request status. This is ok b/c we don't expect any tasks to still be pending after the currently running task finishes. However I found one instance where that wasn't true related to serializing thenables which I've fixed so we may find other cases. If we do, though it's almost certainly a bug in our task bookkeeping so we should just fix it if it comes up. I also updated `abort` to not set the status to ABORTING unless the status was OPEN. we don't want to ever leave CLOSED or CLOSING status
Changed paths2 files
First-parent comparisonpackages/react-server-dom-webpack/src/__tests__/ReactFlightDOM-test.js ModifiedM packages/react-server/src/ReactFlightServer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…