next.js
852092f2 - Update metadata ready tracking (#67929)

Commit
1 year ago
Update metadata ready tracking (#67929) Refactors the `createMetadataComponents` function to convey readiness via a promise `metadataReady` rather than a renderable component `<MetadataOutlet>`. I also moved the resolution out of the render and into the factory function because we generally only want to do this resolution once and later we may retry the RSC render and it is wasteful to recompute the resolved value. I am instrumenting the ready promise with `status` and `value` so that in a future update React can unrwap the value synchronously. This isn't very important right now but in the future we will want to take advantage of it.
Author
Parents
Loading