Please sign in to comment.
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
- Loading branch information
Showing with 160 additions and 159 deletions.
- +2 −5 packages/react-cache/src/ReactCache.js
- +78 −74 packages/react-client/src/ReactFlightClient.js
- +3 −4 packages/react-devtools-shared/src/devtools/cache.js
- +4 −4 packages/react-dom/src/test-utils/ReactTestUtilsAct.js
- +1 −6 packages/react-flight-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js
- +15 −15 packages/react-reconciler/src/ReactFiberCommitWork.js
- +4 −4 packages/react-reconciler/src/ReactFiberReconciler.old.js
- +3 −3 packages/react-reconciler/src/ReactFiberRoot.js
- +14 −14 packages/react-reconciler/src/ReactFiberThrow.js
- +8 −14 packages/react-reconciler/src/ReactFiberWorkLoop.js
- +9 −11 packages/react/src/ReactLazy.js
- +18 −0 packages/shared/ReactTypes.js
- +1 −5 scripts/flow/environment.js
Oops, something went wrong.