-
Notifications
You must be signed in to change notification settings - Fork 47.9k
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
Revert "Fix:- Improve HOC support and state preservation in React Refresh" #32214
Conversation
Comparing: b65afdd...e5d6858 Critical size changesIncludes critical production bundles, as well as any change greater than 2%: Significant size changesIncludes any change greater than 0.2%: Expand to show
|
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.
sgtm
thanks @gaearon for the follow up, happy to collaborate if we are looking forward to revert the changes and understand if its necessary! |
I've taken a closer look at this. I do believe the original bug is legit. I.e. I can reproduce it in RN. So this is something that does need to be fixed. Regarding the fix, I'm still not sure and I think it merits more investigation:
My main concern with merging this is that it does the minimal job to fix that particular bug, but it undermines the assumptions of how this thing was meant to work. I think the fix is probably in the wrong place, and if we sit down and describe the exact sequencing of what is going wrong, we'll find a more natural place to apply the fix that doesn't undermine the existing constraints. Or maybe we discover that there's some more fundamental issue with how it was designed. But we need a concrete writedown of what's going wrong first. |
Thanks @gaearon for the detailed follow up,makes sense and appreciate your time on this,i feel we can take my changes as a point to do the right fixes. |
Reverts #30660
I don’t feel confident in the approach. This part of code is supposed to rely on the module bundler behaving as expected. Maybe this is correct but I need to review it closer — it was intentionally not implemented this way originally.
I’ll try to take a closer look some time this week. We don’t have to merge this revert right now but just flagging that I don’t understand the thinking behind the new approach and don’t have confidence in it.