-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline ChildProp #58519
Merged
Merged
Inline ChildProp #58519
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This closure was only used in one place and it was immediately executed right after being defined. So I inlined it.
I'm working on a refactor to seed the CacheNodes as soon as the Flight payload is received, rather than lazily during the render phase. This means we no longer need to pass a child element prop to LayoutRouter via childProp. ChildProp includes two fields: a segment and a child element. The child element is the part that will soon be removed, because we'll instead always read from the cache nodes. But even after this refactor, we still need to pass the segment to LayoutRouter. So as an incremental step, I've inlined both fields into separate props: - childProp.current -> initialChildNode. This will be removed in a later step in favor of reading from the cache nodes. In fact, we already always read from the cache nodes — childProp is ignored completely once the cache node is populated, hence the updated name. - childProp.segment -> childPropSegment. This probably isn't the best name anymore but I'll leave renaming until later once more of this refactor has settled.
Stats from current PRDefault BuildGeneral
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
Next Runtimes
Diff detailsDiff for page.jsDiff too large to display Diff for 199-HASH.jsDiff too large to display Diff for app-page-exp..ntime.dev.jsDiff too large to display Diff for app-page-exp..time.prod.jsDiff too large to display Diff for app-page-tur..time.prod.jsDiff too large to display Diff for app-page-tur..time.prod.jsDiff too large to display Diff for app-page.runtime.dev.jsDiff too large to display Diff for app-page.runtime.prod.jsDiff too large to display |
Tests Passed |
acdlite
requested review from
timneutkens,
ijjk,
shuding,
huozhi,
feedthejim,
ztanner and
wyattjoh
as code owners
November 16, 2023 03:12
timneutkens
approved these changes
Nov 16, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm working on a refactor to seed the CacheNodes as soon as the Flight payload is received, rather than lazily during the render phase. This means we no longer need to pass a child element prop to LayoutRouter via childProp.
ChildProp includes two fields: a segment and a child element. The child element is the part that will soon be removed, because we'll instead always read from the cache nodes.
But even after this refactor, we still need to pass the segment to LayoutRouter. So as an incremental step, I've inlined both fields into separate props: