dillon1000/react

Commit

Formalize the Wakeable and Thenable types (#18391)

* Formalize the Wakeable and Thenable types

We use two subsets of Promises throughout React APIs. This introduces
the smallest subset - Wakeable. It's the thing that you can throw to
suspend. It's something that can ping.

I also use a shared type for Thenable in the cases where we expect a value
so we can be a bit more rigid with our us of them.

* Make Chunks into Wakeables instead of using native Promises

This value is just going from here to React so we can keep it a lighter
abstraction throughout.

* Renamed thenable to wakeable in variable names
Browse files
Changed paths13 files
First-parent comparison
M packages/react-cache/src/ReactCache.js ModifiedM packages/react-client/src/ReactFlightClient.js ModifiedM packages/react-devtools-shared/src/devtools/cache.js ModifiedM packages/react-dom/src/test-utils/ReactTestUtilsAct.js ModifiedM packages/react-flight-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js ModifiedM packages/react-reconciler/src/ReactFiberCommitWork.js ModifiedM packages/react-reconciler/src/ReactFiberReconciler.old.js ModifiedM packages/react-reconciler/src/ReactFiberRoot.js ModifiedM packages/react-reconciler/src/ReactFiberThrow.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react/src/ReactLazy.js ModifiedM packages/shared/ReactTypes.js ModifiedM scripts/flow/environment.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…