Skip to content

[flags] add enableEffectEventMutationPhase#35548

Merged
rickhanlonii merged 5 commits intofacebook:mainfrom
rickhanlonii:rh/uee-mutation-2
Feb 4, 2026
Merged

[flags] add enableEffectEventMutationPhase#35548
rickhanlonii merged 5 commits intofacebook:mainfrom
rickhanlonii:rh/uee-mutation-2

Conversation

@rickhanlonii
Copy link
Member

@rickhanlonii rickhanlonii commented Jan 17, 2026

Small optimization for useEffectEvent. Not sure we even need a flag for it, but it will be a nice killswitch.

As an added benefit, it fixes a bug when enableViewTransition is on, where we were not updating the useEffectEvent callback when a tree went from hidden to visible.

@meta-cla meta-cla bot added the CLA Signed label Jan 17, 2026
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jan 17, 2026
@react-sizebot
Copy link

react-sizebot commented Jan 17, 2026

Comparing: 087a346...bc2bbc7

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.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 610.53 kB 610.53 kB = 107.91 kB 107.91 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 676.46 kB 676.46 kB = 118.87 kB 118.87 kB
facebook-www/ReactDOM-prod.classic.js +0.07% 696.25 kB 696.77 kB +0.12% 122.34 kB 122.49 kB
facebook-www/ReactDOM-prod.modern.js +0.08% 686.63 kB 687.15 kB +0.12% 120.74 kB 120.89 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against bc2bbc7

});

// @gate enableActivity
it('effect events are fresh in deeply nested hidden Activities', async () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebmarkbage this is a simplified test.

rickhanlonii added a commit that referenced this pull request Feb 4, 2026
…35555)

Related to #35548,
`enableViewTransition` fixes a bug where `getSnapshotBeforeUpdate` was
running in hidden trees when it shouldn't (`componentWillUpdate` won't
run for hidden updates, and when it becomes visible it will be called
with `componentWillMount`).
github-actions bot pushed a commit that referenced this pull request Feb 4, 2026
…35555)

Related to #35548,
`enableViewTransition` fixes a bug where `getSnapshotBeforeUpdate` was
running in hidden trees when it shouldn't (`componentWillUpdate` won't
run for hidden updates, and when it becomes visible it will be called
with `componentWillMount`).

DiffTrain build for [087a346](087a346)
@rickhanlonii rickhanlonii merged commit 3aaab92 into facebook:main Feb 4, 2026
234 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 4, 2026
Small optimization for useEffectEvent. Not sure we even need a flag for
it, but it will be a nice killswitch.

As an added benefit, it fixes a bug when `enableViewTransition` is on,
where we were not updating the useEffectEvent callback when a tree went
from hidden to visible.

DiffTrain build for [3aaab92](3aaab92)
github-actions bot pushed a commit that referenced this pull request Feb 4, 2026
Small optimization for useEffectEvent. Not sure we even need a flag for
it, but it will be a nice killswitch.

As an added benefit, it fixes a bug when `enableViewTransition` is on,
where we were not updating the useEffectEvent callback when a tree went
from hidden to visible.

DiffTrain build for [3aaab92](3aaab92)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants