Skip to content

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

Open
eps1lon wants to merge 2 commits intofacebook:mainfrom
eps1lon:sebbie/se-fr
Open

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

Conversation

@eps1lon
Copy link
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

Comparing: 93882bd...71c0f2a

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 = 611.79 kB 611.79 kB = 108.12 kB 108.12 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 = 677.72 kB 677.72 kB = 119.08 kB 119.08 kB
facebook-www/ReactDOM-prod.classic.js = 697.67 kB 697.67 kB = 122.58 kB 122.58 kB
facebook-www/ReactDOM-prod.modern.js = 687.98 kB 687.98 kB = 120.96 kB 120.96 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 71c0f2a

@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
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

2 participants