Skip to content

[Fiber] Double invoke Effects in StrictMode after Fast Refresh#35962

Merged
eps1lon merged 2 commits intofacebook:mainfrom
eps1lon:sebbie/se-fr
Apr 17, 2026
Merged

[Fiber] Double invoke Effects in StrictMode after Fast Refresh#35962
eps1lon merged 2 commits intofacebook:mainfrom
eps1lon:sebbie/se-fr

Conversation

@eps1lon
Copy link
Copy Markdown
Collaborator

@eps1lon eps1lon commented Mar 5, 2026

Summary

Fixes #29915

Ensures Effects are also double invoked when a Component newly mounts due to Fast Refresh. Looks to have been an oversight in the remountFiber path.

How did you test this change?

  • Added test (see first commit for previous behavior)

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

react-sizebot commented Mar 5, 2026

Comparing: 23fcd7c...1eab7a6

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 = 612.91 kB 612.91 kB = 108.30 kB 108.30 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB +0.05% 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 678.85 kB 678.85 kB = 119.27 kB 119.27 kB
facebook-www/ReactDOM-prod.classic.js = 698.58 kB 698.58 kB = 122.74 kB 122.74 kB
facebook-www/ReactDOM-prod.modern.js = 688.90 kB 688.90 kB = 121.12 kB 121.12 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 1eab7a6

@eps1lon eps1lon requested a review from acdlite March 5, 2026 08:53
@eps1lon eps1lon marked this pull request as ready for review March 5, 2026 08:53
@eps1lon eps1lon merged commit da9325b into facebook:main Apr 17, 2026
235 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 17, 2026
github-actions bot pushed a commit that referenced this pull request Apr 17, 2026
@eps1lon eps1lon deleted the sebbie/se-fr branch April 17, 2026 17:18
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.

[React 19] useEffect does not re-fire on hot reload with React 19 and vite

4 participants