dillon1000/react

Commit

Track thenable state in work loop

This is a refactor to track the array of thenables that is preserved
across replays in the work loop instead of the Thenable module.

The reason is that I'm about to add additional state to the Thenable
module that is specific to a particular attempt — like the current
index — and is reset between replays. So it's helpful to keep the two
kinds of state separate so it's clearer which state gets reset when.

The array of thenables is not reset until the work-in-progress either
completes or unwinds.

This also makes the structure more similar to Fizz and Flight.
Browse files
Changed paths7 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberHooks.new.js ModifiedM packages/react-reconciler/src/ReactFiberHooks.old.js ModifiedM 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 ModifiedM packages/react-reconciler/src/__tests__/ReactThenable-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…