-
Notifications
You must be signed in to change notification settings - Fork 47.4k
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
Conversation
When no signatures on both sides, consider as not equal signature, forcing remount and not refresh
Comparing: 7b84dbd...856e5e2 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
@@ -128,7 +128,7 @@ function haveEqualSignatures(prevType, nextType) { | |||
const nextSignature = allSignaturesByType.get(nextType); | |||
|
|||
if (prevSignature === undefined && nextSignature === undefined) { | |||
return true; | |||
return false; |
There was a problem hiding this comment.
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.
The current behavior is correct. #20417 (comment) |
This was a draft PR on purpose, for the CI to run, |
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. :-) |
When no signatures on both sides, consider as not equal signature,
forcing remount and not refresh
Summary
Test Plan