GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Fiber] Gate Update flag on BeforeMutationMask on flags by sebmarkbage · Pull Request #31921 · react/react

Conversation

@sebmarkbage

@sebmarkbage sebmarkbage commented Dec 26, 2024

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sebmarkbage
Gate Update flag on BeforeMutationMask on flags
ca95570
@sebmarkbage
sebmarkbage requested review from acdlite, poteto and rickhanlonii December 26, 2024 20:33
@vercel

vercel Bot commented Dec 26, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 26, 2024 8:35pm
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 26, 2024
@vercel
vercel Bot deployed to Preview December 26, 2024 20:35
View deployment
@react-sizebot

react-sizebot commented Dec 26, 2024

Copy link
Copy Markdown

Comparing: fc8a898dd126198305fce458edd084c5d9c4b67a...25cfe7cdd0089da4d9e0a2642a1003ec1d97b4e3

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 511.38 kB 511.38 kB = 91.38 kB 91.38 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 516.17 kB 516.17 kB = 92.23 kB 92.23 kB
facebook-www/ReactDOM-prod.classic.js = 593.09 kB 593.09 kB = 104.45 kB 104.45 kB
facebook-www/ReactDOM-prod.modern.js = 583.35 kB 583.35 kB = 102.90 kB 102.90 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against ca95570

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rickhanlonii
rickhanlonii reviewed Jan 2, 2025
View reviewed changes

@rickhanlonii rickhanlonii left a comment

Copy link
Copy Markdown
Contributor

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/react-reconciler/src/ReactFiberFlags.js
? // 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

@rickhanlonii rickhanlonii Jan 2, 2025

Copy link
Copy Markdown
Contributor

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sebmarkbage sebmarkbage Jan 2, 2025

Copy link
Copy Markdown
Contributor Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rickhanlonii reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread packages/react-reconciler/src/ReactFiberFlags.js

export const BeforeMutationMask: number =
// TODO: Remove Update flag from before mutation phase by re-landing Visibility
// flag logic (see #20043)

@rickhanlonii rickhanlonii Jan 2, 2025

Copy link
Copy Markdown
Contributor

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.

Did we actually do this? Comment added in #20622 referring to #20043

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sebmarkbage sebmarkbage Jan 2, 2025

Copy link
Copy Markdown
Contributor Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rickhanlonii reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
rickhanlonii
rickhanlonii approved these changes Jan 2, 2025
View reviewed changes
@sebmarkbage
sebmarkbage merged commit 6ca7fbe into react:main Jan 2, 2025
github-actions Bot pushed a commit that referenced this pull request Jan 2, 2025
@sebmarkbage
[Fiber] Gate Update flag on BeforeMutationMask on flags (#31921)
80269ba
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)
github-actions Bot pushed a commit that referenced this pull request Jan 2, 2025
@sebmarkbage
[Fiber] Gate Update flag on BeforeMutationMask on flags (#31921)
4609a1d
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)
@vercel-release-bot vercel-release-bot mentioned this pull request Jan 3, 2025
Upgrade React from 518d06d2-20241219 to 3b009b4c-20250102 vercel/next.js#74492
Merged
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@sebmarkbage
[Fiber] Gate Update flag on BeforeMutationMask on flags (react#31921)
f7437fe
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.

This branch was successfully deployed

1 active deployment
Preview — ca955705 Deployed Dec 26, 2024 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@poteto poteto Awaiting requested review from poteto
@acdlite acdlite Awaiting requested review from acdlite
1 more reviewer
@rickhanlonii rickhanlonii rickhanlonii approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@sebmarkbage @react-sizebot @rickhanlonii @facebook-github-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.