Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fast-refresh): fix #20417 #21074

Closed

Conversation

Bnaya
Copy link

@Bnaya Bnaya commented Mar 24, 2021

When no signatures on both sides, consider as not equal signature,
forcing remount and not refresh

Summary

Test Plan

When no signatures on both sides, consider as not equal signature,
forcing remount and not refresh
@sizebot
Copy link

sizebot commented Mar 24, 2021

Comparing: 7b84dbd...856e5e2

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.min.js = 122.80 kB 122.80 kB = 39.50 kB 39.50 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 129.21 kB 129.21 kB = 41.50 kB 41.50 kB
facebook-www/ReactDOM-prod.classic.js = 408.57 kB 408.57 kB = 75.62 kB 75.62 kB
facebook-www/ReactDOM-prod.modern.js = 396.83 kB 396.83 kB = 73.70 kB 73.70 kB
facebook-www/ReactDOMForked-prod.classic.js = 408.57 kB 408.57 kB = 75.62 kB 75.62 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 856e5e2

@@ -128,7 +128,7 @@ function haveEqualSignatures(prevType, nextType) {
const nextSignature = allSignaturesByType.get(nextType);

if (prevSignature === undefined && nextSignature === undefined) {
return true;
return false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change would cause every component without Hooks to always be remounted. That's not right.

@gaearon
Copy link
Collaborator

gaearon commented Mar 24, 2021

#20417 (comment)

@gaearon
Copy link
Collaborator

gaearon commented Mar 25, 2021

The current behavior is correct. #20417 (comment)

@gaearon gaearon closed this Mar 25, 2021
@Bnaya
Copy link
Author

Bnaya commented Mar 25, 2021

This was a draft PR on purpose, for the CI to run,
Do you have a policy to not keep them around?

@gaearon gaearon reopened this Mar 25, 2021
@gaearon
Copy link
Collaborator

gaearon commented Mar 25, 2021

Yeah I assumed that the issue is already solved in which case PR isn't needed. But like I mentioned on the issue, it seems like my analysis wasn't right. So feel free to keep exploring. :-)

@Bnaya Bnaya closed this Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants