dillon1000/react

Commit

Check thenable instead of thenableState

Now that hook state is preserved while the work loop is suspended, we
don't need to track the thenable state in the work loop. We can track
it alongside the rest of the hook state.

Before deleting the thenable state variable from the work loop, I need
to remove the other places where it's referenced.

One of them is `isThenableStateResolved`. This grabs the last thenable
from the array and checks if it has resolved.

This was a pointless indirection anyway. The thenable is already stored
as `workInProgressThrownValue`. So we can check that directly.
Browse files
Changed paths4 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberThenable.new.js ModifiedM packages/react-reconciler/src/ReactFiberThenable.old.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.new.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.old.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…