Repository navigation
wp.element - export lazy and Suspense - #14412
Conversation
# Conflicts: # packages/element/src/react.js
a2e1458 to
bc38279
Compare
| /** | ||
| * Make React Hooks available | ||
| * | ||
| * @param {function} loadFunction A function that must call a dynamic import(). This must return a Promise which |
There was a problem hiding this comment.
I don't think this was meant to be included here?
There was a problem hiding this comment.
Right, fixed. Not sure why there are unrelated docs changes even after merging master and running npm run docs:build - am I missing a step?
ps. thanks for reviewing!
There was a problem hiding this comment.
running npm run docs:build - am I missing a step?
Can you try it once more? The changes I would have expected with this erroneous DocBlock, but I expect should be largely cleared up if run in the current state of the branch. Would also explain the failing build.
There was a problem hiding this comment.
grabbed readme from master, then re-ran - changes in 1466b25.
| * @param {function} loadFunction A function that must call a dynamic import(). This must return a Promise which | ||
| * resolves to a module with a default export containing a React component. | ||
| */ | ||
| export { lazy }; |
There was a problem hiding this comment.
Nice, i updated my PR to use this format in bb22466
# Conflicts: # packages/element/src/react.js
…to add/lazy-suspense # Conflicts: # packages/element/README.md
|
I update links to use React Top-Level API page.
@TimothyBJacobs do you think that it makes sense to open a follow-up PR with some explanation of how |
gziolo
left a comment
There was a problem hiding this comment.
@adamsilverstein thanks for this addition 👍
|
I also updated CHANGELOG file with new API methods exposed. In addition, I included all hooks which weren't fully documented in the last release. See 00fe1c5. |
Yep. This week is a bit hectic, but I can work on something for next week if that helps. |
Description
Add
React.lazyandReact.suspenseto exports fromwp.element.Fixes #14155
Testing
Load Gutenberg and check the console for
lazyandSuspenseonwp.element.Screenshot
Checklist: