Registry Mirror
Skip to content

Conversation

@rickhanlonii

@rickhanlonii rickhanlonii commented Jan 17, 2026 •

Copy link
Copy Markdown
Contributor

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

react-sizebot commented Jan 17, 2026 •

Copy link
Copy Markdown

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
Copy Markdown
Contributor 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 react:main Feb 4, 2026
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)
github-actions Bot pushed a commit to code/lib-react that referenced this pull request Feb 8, 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](react@3aaab92)
github-actions Bot pushed a commit to code/lib-react that referenced this pull request Feb 8, 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](react@3aaab92)
hoxyq added a commit that referenced this pull request Jul 16, 2026
Enable it first, will be removed later in
#37013, once it gets to stable.

See #35548 for context on the gated
changes.
github-actions Bot pushed a commit that referenced this pull request Jul 16, 2026
Enable it first, will be removed later in
#37013, once it gets to stable.

See #35548 for context on the gated
changes.

DiffTrain build for [cec5a9b](cec5a9b)
github-actions Bot pushed a commit that referenced this pull request Jul 16, 2026
Enable it first, will be removed later in
#37013, once it gets to stable.

See #35548 for context on the gated
changes.

DiffTrain build for [cec5a9b](cec5a9b)
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
…eact#35555)

Related to react#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`).
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 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.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
Enable it first, will be removed later in
react#37013, once it gets to stable.

See react#35548 for context on the gated
changes.
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