-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: resolve legacy component props equality for mutations #12348
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
Conversation
🦋 Changeset detectedLatest commit: 82983fd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
hold up, i don't think this is right
Added the 'request changes' because I was still investigating and wanted to make sure we didn't merge hastily. My concern was that this might be addressing the symptom rather than the cause, which is that sources inside a mutable proxy can diverge from their ground truth — in fact it's fixable with a much smaller diff: get(target, prop, receiver) {
// ...
if (s !== undefined) {
+ if (!metadata.i && metadata.p !== s.v) {
+ // in mutable mode, it's possible for the source to diverge from the ground truth
+ s.v = proxy(metadata.t[prop]);
}
const value = get(s);
return value === UNINITIALIZED ? undefined : value;
}
return Reflect.get(target, prop, receiver);
} But I was wrong, because this is the only place where proxies can be mutable. I'm still going to make a couple of tweaks though:
|
…lte into legacy-component-props-each
Fixes #12235