Skip to content

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented May 27, 2024

Summary

Test for current behavior experienced in #29585.

How did you test this change?

  • yarn test --watch packages/react-reconciler/src/__tests__/StrictEffectsMode-test.js -t "effect invovation after key swap"

@vercel
Copy link

vercel bot commented May 27, 2024

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 May 27, 2024 10:13am

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels May 27, 2024
@eps1lon eps1lon force-pushed the strict-effects-bad-invocations branch 3 times, most recently from 4485e6b to 3b1f29b Compare May 27, 2024 10:02
@react-sizebot
Copy link

react-sizebot commented May 27, 2024

Comparing: ea6e059...f94b10f

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.66 kB 6.66 kB +0.05% 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 496.04 kB 496.04 kB = 88.77 kB 88.77 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.67 kB 6.67 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 500.84 kB 500.84 kB = 89.45 kB 89.46 kB
facebook-www/ReactDOM-prod.classic.js = 593.48 kB 593.48 kB = 104.38 kB 104.38 kB
facebook-www/ReactDOM-prod.modern.js = 569.87 kB 569.87 kB = 100.77 kB 100.77 kB
test_utils/ReactAllWarnings.js Deleted 63.82 kB 0.00 kB Deleted 15.95 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 63.82 kB 0.00 kB Deleted 15.95 kB 0.00 kB

Generated by 🚫 dangerJS against f94b10f

Comment on lines +1116 to +1117
"passive destroy second: 1",
"passive create second: 1",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just double invoking the second one.

}
});

it('effect invovation after key swap', async () => {

Choose a reason for hiding this comment

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

typo - invovation -> invocation

@rachitiitr
Copy link

Do we want to rephrase the PR title?
From

Current behavior for Effect behavior in StrictMode when reordering #29595

To

Added tests highlighting useEffect behavior during reordering in StrictMode

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.

4 participants