-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
[Fiber] Gate Update flag on BeforeMutationMask on flags #31921
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Comparing: fc8a898...25cfe7c Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
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.
Defer to @acdlite because I don't know much about the fiber flags.
What is the Update
flag intended to represent?
? // TODO: The useEffectEvent hook uses the snapshot phase for clean up but it | ||
// really should use the mutation phase for this or at least schedule an | ||
// explicit Snapshot phase flag for this. | ||
Update |
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.
I can update useEffectEvent, what's the reasoning for using the mutation phase for cleanup?
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.
I'm not quite sure why this needs an effect in general but ideally this is more like a read only phase and since it's rarely visited (except I will make heavy use of it in my VT PR) we shouldn't unnecessarily traverse for something unrelated like this.
@@ -77,17 +80,19 @@ export const MountPassiveDev = /* */ 0b1000000000000000000000000000 | |||
// don't contain effects, by checking subtreeFlags. | |||
|
|||
export const BeforeMutationMask: number = | |||
// TODO: Remove Update flag from before mutation phase by re-landing Visibility | |||
// flag logic (see #20043) |
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.
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.
I think so because there's nothing that refer to it.
We're currently visiting the snapshot phase for every `Update` flag even though we rarely have to do anything in the Snapshot phase. The only flags that seem to use these wider visits is `enableCreateEventHandleAPI` and `enableUseEffectEventHook` but really neither of those should do that neither. They should schedule explicit Snapshot phases if needed. DiffTrain build for [6ca7fbe](6ca7fbe)
We're currently visiting the snapshot phase for every `Update` flag even though we rarely have to do anything in the Snapshot phase. The only flags that seem to use these wider visits is `enableCreateEventHandleAPI` and `enableUseEffectEventHook` but really neither of those should do that neither. They should schedule explicit Snapshot phases if needed. DiffTrain build for [6ca7fbe](6ca7fbe)
We're currently visiting the snapshot phase for every
Update
flag even though we rarely have to do anything in the Snapshot phase.The only flags that seem to use these wider visits is
enableCreateEventHandleAPI
andenableUseEffectEventHook
but really neither of those should do that neither. They should schedule explicit Snapshot phases if needed.