Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Accept promise as element type #13397
On the initial render, the element will suspend as if a promise were thrown from inside the body of the unresolved component. Siblings should continue rendering and if the parent is a Placeholder, the promise should be captured by that Placeholder.
When the promise resolves, rendering resumes. If the resolved value has a
The resolved value is stored as an expando on the promise/thenable.
Details of bundled changes.
This use case is literally the point of default exports. To provide a conceptual main item among other items so that it can be picked automatically.
There is no benefit to not resolving it, since you gain no syntactical benefit when you don't use them. It's still the same bloated syntax to load a named export whether this exists or not. Other than artificially encourage the more bloated form.
You can search for uses of this file: https://github.com/facebook/react-devtools/blob/master/backend/ReactTypeOfWork.js
Will need to check the version we inject into DevTools and use the new file if it’s fresh enough.