dillon1000/react
Commit
Browse files Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel (#31554)
This lets us track separately if something was suspended on an Action using useActionState rather than suspended on Data. This approach feels quite bloated and it seems like we'd eventually might want to read more information about the Promise that suspended and the context it suspended in. As a more general reason for suspending. The way useActionState works in combination with the prewarming is quite unfortunate because 1) it renders blocking to update the isPending flag whether you use it or not 2) it prewarms and suspends the useActionState 3) then it does another third render to get back into the useActionState position again.
Changed paths8 files
First-parent comparisonpackages/react-debug-tools/src/ReactDebugHooks.js ModifiedM packages/react-reconciler/src/ReactChildFiber.js ModifiedM packages/react-reconciler/src/ReactFiberHooks.js ModifiedM packages/react-reconciler/src/ReactFiberThenable.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-server/src/ReactFizzThenable.js ModifiedM packages/react-server/src/ReactFlightThenable.js ModifiedM scripts/error-codes/codes.json ModifiedPatch
Files changed
Rendering syntax-highlighted changes…